mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Merge branch 'fix_inital_migration' into 'dev'
Fix initial migration See merge request federez/re2o!295
This commit is contained in:
commit
eb712c7c6f
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,9 @@ def update_rights(apps, schema_editor):
|
||||||
create_permissions(app)
|
create_permissions(app)
|
||||||
app.models_module = False
|
app.models_module = False
|
||||||
|
|
||||||
former = Permission.objects.get(codename='change_facture_pdf')
|
ContentType = apps.get_model("contenttypes", "ContentType")
|
||||||
|
content_type = ContentType.objects.get_for_model(Permission)
|
||||||
|
former, created = Permission.objects.get_or_create(codename='change_facture_pdf', content_type=content_type)
|
||||||
new_1 = Permission.objects.get(codename='add_custominvoice')
|
new_1 = Permission.objects.get(codename='add_custominvoice')
|
||||||
new_2 = Permission.objects.get(codename='change_custominvoice')
|
new_2 = Permission.objects.get(codename='change_custominvoice')
|
||||||
new_3 = Permission.objects.get(codename='view_custominvoice')
|
new_3 = Permission.objects.get(codename='view_custominvoice')
|
||||||
|
|
Loading…
Reference in a new issue