mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-11-27 00:07:12 +00:00
Un permanencier peut entierrement modif une clef (demande darchou <3)
This commit is contained in:
parent
75424a6108
commit
7acbacbf1a
@ -290,10 +290,7 @@ def edit_clef(request, clefid):
|
|||||||
except Clef.DoesNotExist:
|
except Clef.DoesNotExist:
|
||||||
messages.error(request, u"Entrée inexistante" )
|
messages.error(request, u"Entrée inexistante" )
|
||||||
return redirect("/users/index_clef/")
|
return redirect("/users/index_clef/")
|
||||||
if request.user.has_perms(('bureau',)):
|
|
||||||
clef = ClefForm(request.POST or None, instance=clef_instance)
|
clef = ClefForm(request.POST or None, instance=clef_instance)
|
||||||
else:
|
|
||||||
clef = BaseClefForm(request.POST or None, instance=clef_instance)
|
|
||||||
if clef.is_valid():
|
if clef.is_valid():
|
||||||
with transaction.atomic(), reversion.create_revision():
|
with transaction.atomic(), reversion.create_revision():
|
||||||
clef.save()
|
clef.save()
|
||||||
|
Loading…
Reference in New Issue
Block a user