mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 17:47:02 +02:00
More code cleanup
This commit is contained in:
parent
3d0a519ab0
commit
81e5f5f8bb
3 changed files with 11 additions and 21 deletions
|
@ -167,16 +167,14 @@ class DomainAdmin(ListHeaderAdmin):
|
|||
request.session["analyst_action"] = "edit"
|
||||
# Restricts this action to this domain (pk) only
|
||||
request.session["analyst_action_location"] = obj.id
|
||||
|
||||
return HttpResponseRedirect(reverse("domain", args=(obj.id,)))
|
||||
return super().response_change(request, obj)
|
||||
|
||||
def change_view(self, request, object_id):
|
||||
# If the analyst was recently editing
|
||||
# If the analyst was recently editing a domain page,
|
||||
# delete any associated session values
|
||||
if "analyst_action" in request.session:
|
||||
# delete the session variable
|
||||
del request.session["analyst_action"]
|
||||
# delete the associated location
|
||||
del request.session["analyst_action_location"]
|
||||
return super().change_view(request, object_id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue