ExecuteAndDistribute sending duplicate emails since upgrade to V8 from V7.9

I have a gateway script triggered on a tag (SMMain/TriggerReportProduction) that used to only send 1 email, but since upgrading to V8 from V7.9, I have started to receive 2. I started to see this issue with V8.02 and have since upgraded to V8.03.
Here is my script, I hope that someone will see my mistake.
I have added logging to make sure that the email IF statement is only being called once. Log info follow the script.


> logger = system.util.logger("TestTriggerReport") 
> #logger.info("Info to log") 
> #logger.error("Error to log")
> start_time = system.date.format(system.date.now(), "yyyy-MMM-dd HH-mm-ss")
> logger.info("Start Report at " + start_time)
> logger.info("Starting TestTriggerReport")
> report_time = system.date.format(system.date.now(), "yyyy-MMM-dd HH-mm")
> filename = "Production Summary " + report_time + ".pdf"
> #Publish report to PDF file
> pdf_settings = {"path":"C:\\Ignition Reports", "fileName":filename, "format":"pdf"}
> #Email PDF to distribution list
> email_settings = {"to":["gloweware@gmail.com"], "smtpServerName":"EmailServer", "from":"gloweware@gmail.com", "subject":"Production Report " + report_time, "attachmentName":filename}
> trigger_report = system.tag.read("[default]SMMAIN/TriggerReportProduction").value
> if trigger_report:
> #Executes and distributes the report to a PDF
> 	save_time = system.date.format(system.date.now(), "yyyy-MMM-dd HH-mm-ss")
> 	logger.info("Saving Report at " + save_time)
> 	system.report.executeAndDistribute(path="ProductionReport", project="Reports_V2", action="save", actionSettings=pdf_settings)
> trigger_email = trigger_report and system.tag.read("[default]SMMAIN/EmailReportProduction").value
> if trigger_email:
> # Executes and distributes the report to an email address.
> # FYI: The email server is set up on the gateway via the web interface
> 	email_time = system.date.format(system.date.now(), "yyyy-MMM-dd HH-mm-ss")
> 	logger.info("Sending Report at " + email_time)
> 	system.report.executeAndDistribute(path="ProductionReport", project="Reports_V2", action="email", actionSettings=email_settings)
> #Send a handshake back to SMMAIN in all cases
> system.tag.write("[default]SMMAIN/TriggerReportProductionHS",1)
> done_time = system.date.format(system.date.now(), "yyyy-MMM-dd HH-mm-ss")
> logger.info("Finished Report at " + done_time)

Log Info:

TestTriggerReport 11Sep2019 06:32:10 Finished Report at 2019-Sep-11 06-32-10
TestTriggerReport 11Sep2019 06:32:10 Starting TestTriggerReport
TestTriggerReport 11Sep2019 06:32:10 Start Report at 2019-Sep-11 06-32-10
TestTriggerReport 11Sep2019 06:32:08 Finished Report at 2019-Sep-11 06-32-08
TestTriggerReport 11Sep2019 06:32:06 Sending Report at 2019-Sep-11 06-32-06
TestTriggerReport 11Sep2019 06:32:05 Saving Report at 2019-Sep-11 06-32-05
TestTriggerReport 11Sep2019 06:32:05 Starting TestTriggerReport
TestTriggerReport 11Sep2019 06:32:05 Start Report at 2019-Sep-11 06-32-05

Since the original post, I have:
Backed up gateway
Uninstalled Ignition
Renamed the Ignition folder in Program Files to _old
Installed 8.0.4
Restored gateway from backup

I still get the 2 emails.

Figured this out.
After upgrading to 8.0.4, my script started to log duplicate entries, so that was useful.
What I did find was my IF statements were triggering on both High and Low states.
What used to work doesn’t anymore, so I have updated my script with ‘== 1’ test conditions.

What used to work:
if trigger_report:

is now changed to
if trigger_report == 1: