Skip to content

Commit

Permalink
bugfix: support both post_syncd and post_migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
sax committed May 28, 2015
1 parent 9f38a3d commit c3058fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion adminactions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ def create_extra_permission(sender, **kwargs):
Permission.objects.get_or_create(codename=codename, content_type=ct, defaults={'name': label[:50]})


signals.post_migrate.connect(create_extra_permission)
try:
signals.post_migrate.connect(create_extra_permission)
except AttributeError:
signals.post_syncdb.connect(create_extra_permission)

0 comments on commit c3058fc

Please sign in to comment.