Permalink
Browse files

Merge pull request #49 from arambalakjian/3.1

Fixed non versioned ModelAdmin loading
  • Loading branch information...
2 parents ddd904b + 782f125 commit c3cceb0e87982c8d7a2799dbc269313eac282a90 Aram Balakjian committed Feb 25, 2014
Showing with 6 additions and 2 deletions.
  1. +6 −2 code/ModelAdmin/DataObjectAsPageAdmin.php
@@ -6,8 +6,12 @@ class DataObjectAsPageAdmin extends ModelAdmin
public function init()
{
parent::init();
-
- Versioned::reading_stage('Stage');
+
+ //if versioned we need to tell ModelAdmin to read from stage
+ if(Singleton($this->modelClass)->isVersioned)
+ {
+ Versioned::reading_stage('Stage');
+ }
//Styling for preview links and status
Requirements::CSS(MOD_DOAP_DIR . '/css/dataobjectaspageadmin.css');
}

0 comments on commit c3cceb0

Please sign in to comment.