diff --git a/file_watcher/lastrun_file_monitor.py b/file_watcher/lastrun_file_monitor.py index 9eac0f4..5156a8f 100644 --- a/file_watcher/lastrun_file_monitor.py +++ b/file_watcher/lastrun_file_monitor.py @@ -47,7 +47,8 @@ def __init__( self.db_updater = DBUpdater(ip=db_ip, username=db_username, password=db_password) self.latest_known_run_from_db = self.get_latest_run_from_db() logger.info("Last run in DB is: %s", self.latest_known_run_from_db) - if self.latest_known_run_from_db is None: + if (self.latest_known_run_from_db is None + or self.latest_known_run_from_db == 'None'): logger.info("Adding latest run to DB as there is no data: %s", self.last_recorded_run_from_file) self.update_db_with_latest_run(self.last_recorded_run_from_file) self.latest_known_run_from_db = self.last_recorded_run_from_file