Skip to content

Commit

Permalink
a change
Browse files Browse the repository at this point in the history
  • Loading branch information
markj0hnst0n committed Dec 16, 2024
1 parent a8eb35d commit 0d1b063
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mail/chief/licence_reply/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def __init__(self, data: str) -> None:

@classmethod
def load_from_mail(cls, mail: Mail) -> "LicenceReplyProcessor":
acceptable_types = [ExtractTypeEnum.LICENCE_DATA, ExtractTypeEnum.LICENCE_REPLY]
if mail.extract_type not in acceptable_types:
# acceptable_types = [ExtractTypeEnum.LICENCE_DATA, LICENCE_REPLY]
if mail.extract_type != ExtractTypeEnum.LICENCE_DATA:
raise ValueError(
f"Error with Mail ({mail.id} - {mail.response_subject}): Invalid extract type {mail.extract_type}"
)
Expand Down
2 changes: 1 addition & 1 deletion mail/libraries/data_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def serialize_email_message(dto: EmailMessageDto) -> Mail or None:
# f"Unable to process file due to the following error: {error.text}. It was sent in run number {run_number}"
# )

if "Duplicate transaction reference" in _mail.response_data:
if _mail.response_data != None and "Duplicate transaction reference" in _mail.response_data:
raise EdifactFileError(f"Unable to process file due to error with mail {_mail.id} the edi file was {_mail.edi_filename}")


Expand Down

0 comments on commit 0d1b063

Please sign in to comment.