fix a bug where duration would be missing from the info page for non-admins; move user/created/modified to the right column
This commit is contained in:
parent
3ed46c3f6d
commit
f22dd81a7c
2 changed files with 51 additions and 64 deletions
|
|
@ -439,7 +439,8 @@ def edit(request):
|
|||
item.level = data['rightslevel']
|
||||
del data['rightslevel']
|
||||
if 'user' in data:
|
||||
if request.user.get_profile().get_level() in ('admin', 'staff'):
|
||||
if request.user.get_profile().get_level() in ('admin', 'staff') and \
|
||||
models.User.objects.filter(username=data['user']).exists():
|
||||
item.user = models.User.objects.get(username=data['user'])
|
||||
del data['user']
|
||||
r = item.edit(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue