Commits

Anonymous committed 1541c00

look for Arkestra's new get_website property first

  • Participants
  • Parent commits 1dcaff1

Comments (0)

Files changed (1)

semanticeditor/cms_plugins.py

              model = placeholder._get_attached_model()
 
              # all Arkestra models with placeholders will (should) have a
-             # get_website() method.
+             # get_website property.
              try:
-                 page = model.objects.get(**{field: placeholder.id}).get_website()
+                 page = model.objects.get(**{field: placeholder.id}).get_website    
+             # older Arkestra versions used a get_website() method
+             except TypeError:
+                 page = model.objects.get(**{field: placeholder.id}).get_website()    
              except AttributeError:
                  pass