Skip to content
Snippets Groups Projects
Commit 8d980367 authored by Guillaume Samson's avatar Guillaume Samson
Browse files

inbound_email: Update AFNR last date when receiving an email

parent b4762ee7
No related branches found
No related tags found
1 merge request!1381inbound_email: Update AFNR last date when receiving an email
Pipeline #12765 passed
......@@ -43,8 +43,6 @@ def handle_inbound_message(sender: Type, **kwargs) -> EmailProcessingStatus:
except Request.DoesNotExist:
continue
request_updated = False
message_plaintext = get_message_plaintext(message)
if message_plaintext:
history_text = message_plaintext
......@@ -66,12 +64,12 @@ def handle_inbound_message(sender: Type, **kwargs) -> EmailProcessingStatus:
RequestStatus.WAITING_FOR_FEEDBACK: RequestStatus.FEEDBACK_TO_HANDLE,
}.get(RequestStatus[request.status])
request.last_modified_date = history_entry.date
if new_status:
request.status = history_entry.new_status = new_status.name
request_updated = True
history_entry.save()
if request_updated:
request.save()
request.save()
return EmailProcessingStatus.PROCESSED
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment