Commit 32cc8662 authored by jnanar's avatar jnanar

Raise an error if recipients in xlsx and in mail.txt are different

parent 65bc3780
......@@ -164,7 +164,12 @@ class Mail:
my_subject = mail_full[2]
for line in mail_full[3:]:
mail_content += line
if you != recipient:
# The recipient has been changed one of those location: repository or mail.txt
# As a result, opus do not know which one is correct.
# TODO: add a button to reload the xlsx file if it has been changed.
logger.error("Recipient is not identical in generated mail and XLSX file. Abort")
return 1
except FileNotFoundError:
logger.error("Mail txt for {} not found".format(company))
return 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment