Skip to content

Commit

Permalink
Merge pull request #3893 from yakky/feature/fix_use_structure
Browse files Browse the repository at this point in the history
Better use_structure migration
  • Loading branch information
yakky committed Feb 22, 2015
2 parents 0b0b4bb + d3d1f37 commit 3a907af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cms/migrations/0010_migrate_use_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def forwards(apps, schema_editor):
if page_permission in group.permissions.all():
group.permissions.add(permission)
except ContentType.DoesNotExist:
print(u'Cannot migrate users to use_structure permission, please add the permission manually')
print(u'Users not migrated to use_structure permission, please add the permission manually')


def backwards(apps, schema_editor):
Expand All @@ -46,5 +46,9 @@ class Migration(migrations.Migration):
]

operations = [
migrations.AlterModelOptions(
name='placeholder',
options={'permissions': (('use_structure', 'Can use Structure mode'),)},
),
migrations.RunPython(forwards, backwards)
]

0 comments on commit 3a907af

Please sign in to comment.