fixed problem with deleting the default permissions

This commit is contained in:
Oskar Hahn 2012-04-18 16:57:33 +02:00
parent 0c23e9d9cd
commit e9e9fa54b2
2 changed files with 3 additions and 5 deletions

View File

@ -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)
return super(Config, self).form_valid(form)

View File

@ -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")