Skip to content

Commit

Permalink
Invert non-formax behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ericnewcomer committed Nov 25, 2024
1 parent 34d8010 commit f406b13
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions smartmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,7 @@ def form_valid(self, form):
self.object = self.post_save(self.object)

messages.success(self.request, self.derive_success_message())
response = self.render_to_response(self.get_context_data(form=form))
response["REDIRECT"] = self.get_success_url()
return response
return HttpResponseRedirect(self.get_success_url())

except IntegrityError as e:
message = str(e).capitalize()
Expand Down

0 comments on commit f406b13

Please sign in to comment.