Commits

tehfink committed f0e2d67

fixed error if page_id was not set

  • Participants
  • Parent commits 9a829bf

Comments (0)

Files changed (1)

cmsplugin_faq/cms_plugins.py

         #create the link URL
         from cms.models import Page
         #if page_id was not set randomly
-        if not page_id:
+        try:
+            page_id
+        except (NameError, UnboundLocalError):
             page_id = instance.faqentrylink.link.page_id
-        import pdb; pdb.set_trace()
+#        import pdb; pdb.set_trace()
         url = '/' + instance.link.language + Page.objects.get(id=page_id).get_absolute_url()
         
         context.update({