Skip to content

Commit

Permalink
Merge pull request #243 from uktrade/LTD-4776-Skip-empty-edi-data
Browse files Browse the repository at this point in the history
LTD-4776: Skip anonymising if edi_data is empty
  • Loading branch information
kevincarrogan authored Apr 11, 2024
2 parents 453f3e8 + ee6c21d commit c55928c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mail/anonymisers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def sanitize_product_line(line):

def sanitize_edi_data(lines):

if not lines:
return f"{today()}: empty edi data"

if "fileHeader" not in lines and "fileTrailer" not in lines:
return f"{today()}: invalid edi data"

Expand Down

0 comments on commit c55928c

Please sign in to comment.