Browse files

Avoid missing table errors on initial syncdb or migrate. see : #1

  • Loading branch information...
1 parent 3dfad3b commit 8089b3a6dd2d0cfdeb2866e7a23933985a39bd57 @airtonix airtonix committed Dec 18, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 cms_themes/__init__.py
View
8 cms_themes/__init__.py
@@ -32,7 +32,13 @@ def set_themes():
return
site = Site.objects.get(id=settings.SITE_ID)
- themes = [theme.name for theme in site.theme_set.all()]
+ themes = None
+
+ if hasattr(site, 'theme_set'):
+ try:
+ themes = [theme.name for theme in site.theme_set.all()]
+ except:
+ pass
if not themes:
return

0 comments on commit 8089b3a

Please sign in to comment.