better redirect after access permission delete
This commit is contained in:
parent
f9b9f75b7e
commit
067eadecb8
2 changed files with 2 additions and 1 deletions
|
@ -56,6 +56,7 @@
|
|||
</form>
|
||||
{% endif %}
|
||||
|
||||
<a name="access"></a>
|
||||
<h4>{% trans 'Access Permissions' %}</h4>
|
||||
{% if access_restriction %}
|
||||
<p>
|
||||
|
|
|
@ -79,7 +79,7 @@ def user_detail(request, user):
|
|||
messages.success(request, _('Access Permission successfully deleted.'))
|
||||
else:
|
||||
messages.error(request, _('You cannot delete this Access Permission.'))
|
||||
return redirect(request.path_info)
|
||||
return redirect(request.path_info+'?restriction='+str(permission.pk)+'#access')
|
||||
|
||||
api_secret_action = request.POST.get('api_secret')
|
||||
if (api_secret_action and (request.user_permissions.grant_permissions or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue