From e9e9fa54b25105e6e40417999beebbcf2c2ab790 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 18 Apr 2012 16:57:33 +0200 Subject: [PATCH] fixed problem with deleting the default permissions --- openslides/participant/views.py | 4 +++- openslides/utils/utils.py | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/openslides/participant/views.py b/openslides/participant/views.py index 6e0425a3f..6d64adb04 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -44,6 +44,7 @@ from utils.pdf import print_userlist, print_passwords from utils.template import Tab from utils.views import FormView from config.models import config +from utils.utils import delete_default_permissions from django.db.models import Avg, Max, Min, Count @@ -228,6 +229,7 @@ def group_edit(request, group_id=None): raise NameError("There is no group %d" % group_id) else: group = None + delete_default_permissions() if request.method == 'POST': form = GroupForm(request.POST, instance=group) @@ -500,4 +502,4 @@ class Config(FormView): config['participant_pdf_system_url'] = form.cleaned_data['participant_pdf_system_url'] config['participant_pdf_welcometext'] = form.cleaned_data['participant_pdf_welcometext'] messages.success(self.request, _('Participants settings successfully saved.')) - return super(Config, self).form_valid(form) \ No newline at end of file + return super(Config, self).form_valid(form) diff --git a/openslides/utils/utils.py b/openslides/utils/utils.py index f356229c1..34c6e6f34 100644 --- a/openslides/utils/utils.py +++ b/openslides/utils/utils.py @@ -124,7 +124,3 @@ def encodedict(dict): for key in dict: newdict[key] = [unicode(dict[key][0].decode('utf-8'))] return newdict - - -signals.post_syncdb.connect(delete_default_permissions, - dispatch_uid = "openslides.utils.utils.delete_default_permissions")