Skip to content

Commit

Permalink
Skip anonymising if edi_data is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
saruniitr committed Apr 9, 2024
1 parent 453f3e8 commit ee6c21d
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 ee6c21d

Please sign in to comment.