mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 06:56:33 +02:00
cleaned up comment
This commit is contained in:
parent
3fa9e8ec61
commit
5e89d4f652
1 changed files with 5 additions and 2 deletions
|
@ -1407,9 +1407,12 @@ class BaseInvitationAdmin(ListHeaderAdmin):
|
|||
Normal flow on successful save_model on add is to redirect to changelist_view.
|
||||
If there are errors, flow is modified to instead render change form.
|
||||
"""
|
||||
# store current messages from request so that they are preserved throughout the method
|
||||
# store current messages from request in storage so that they are preserved throughout the
|
||||
# method, as some flows remove and replace all messages, and so we store here to retrieve
|
||||
# later
|
||||
storage = get_messages(request)
|
||||
# Check if there are any error or warning messages in the `messages` framework
|
||||
# Check if there are any error messages in the `messages` framework
|
||||
# error messages stop the workflow; other message levels allow flow to continue as normal
|
||||
has_errors = any(message.level_tag in ["error"] for message in storage)
|
||||
|
||||
if has_errors:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue