From 0b5af429a5b1d4747b57b9b0dcb5896d40edaefb Mon Sep 17 00:00:00 2001 From: Alex Barcelo Date: Thu, 17 Dec 2015 18:11:02 +0100 Subject: [PATCH] reverting error due to methods and migrations --- helpdesk/migrations/0009_migrate_queuemembership.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helpdesk/migrations/0009_migrate_queuemembership.py b/helpdesk/migrations/0009_migrate_queuemembership.py index 5bf1f176..4660a3ec 100644 --- a/helpdesk/migrations/0009_migrate_queuemembership.py +++ b/helpdesk/migrations/0009_migrate_queuemembership.py @@ -7,7 +7,6 @@ from django.utils.translation import ugettext_lazy as _ def create_and_assign_permissions(apps, schema_editor): - # If neither Permission nor Membership mechanism are enabled, ignore the migration if not ((hasattr(settings, 'HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION') and 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(): if not q.permission_name: - basename = q.prepare_permission_name + basename = "queue_access_%s" % q.slug + q.permission_name = "helpdesk.%s" % basename else: + # Strip the `helpdesk.` prefix basename = q.permission_name[9:] try: