Skip to content

Commit

Permalink
Post-upgrade: Ensure no longer content types are deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
unho committed Jun 18, 2015
1 parent 81bd5ae commit 779c371
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pootle/apps/pootle_app/management/commands/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ def handle(self, *args, **options):
from django.db import connection
from south.db import db

ContentType.objects.filter(app_label='pootle_app', model='pootleconfig').delete()
if u'pootle_app_pootleconfig' in connection.introspection.table_names():
# Deleting 'PootleConfig' table.
ContentType.objects.filter(app_label='pootle_app', model='pootleconfig').delete()
db.delete_table(u'pootle_app_pootleconfig')

ContentType.objects.filter(app_label='siteconfig', model='siteconfiguration').delete()
if u'siteconfig_siteconfiguration' in connection.introspection.table_names():
# Deleting 'SiteConfiguration' table.
ContentType.objects.filter(app_label='siteconfig', model='siteconfiguration').delete()
db.delete_table(u'siteconfig_siteconfiguration')

# Perform the option related actions.
Expand Down

0 comments on commit 779c371

Please sign in to comment.