Commit 778b9222 authored by Michal Čihař's avatar Michal Čihař

Check for removing last owner

Issue #720
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent f317277a
......@@ -68,7 +68,10 @@ def revoke_owner(request, project):
obj, form = check_user_form(request, project)
if form is not None:
pass
if obj.owners.count() <= 1:
messages.error(request, _('You can not remove last owner!'))
else:
pass
return redirect_param(
'project',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment