mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-31 10:29:15 +01:00
reverting error due to methods and migrations
This commit is contained in:
parent
01598826bf
commit
0b5af429a5
@ -7,7 +7,6 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
|
|
||||||
|
|
||||||
def create_and_assign_permissions(apps, schema_editor):
|
def create_and_assign_permissions(apps, schema_editor):
|
||||||
|
|
||||||
# If neither Permission nor Membership mechanism are enabled, ignore the migration
|
# If neither Permission nor Membership mechanism are enabled, ignore the migration
|
||||||
if not ((hasattr(settings, 'HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION') and
|
if not ((hasattr(settings, 'HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION') and
|
||||||
settings.HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION) or
|
settings.HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION) or
|
||||||
@ -26,8 +25,10 @@ def create_and_assign_permissions(apps, schema_editor):
|
|||||||
|
|
||||||
for q in Queue.objects.all():
|
for q in Queue.objects.all():
|
||||||
if not q.permission_name:
|
if not q.permission_name:
|
||||||
basename = q.prepare_permission_name
|
basename = "queue_access_%s" % q.slug
|
||||||
|
q.permission_name = "helpdesk.%s" % basename
|
||||||
else:
|
else:
|
||||||
|
# Strip the `helpdesk.` prefix
|
||||||
basename = q.permission_name[9:]
|
basename = q.permission_name[9:]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user