Reversed condition.
This commit is contained in:
parent
50a56091b9
commit
f10b62bfd2
1 changed files with 2 additions and 3 deletions
|
|
@ -84,12 +84,11 @@ class Capturer:
|
|||
self.last_try_datetime = datetime.datetime.now()
|
||||
task.capture()
|
||||
|
||||
if task.status == "Data ready":
|
||||
ad_data = task.get_ad_data()
|
||||
else:
|
||||
if not task.status == "Data ready":
|
||||
logging.warning("Something went wrong, not adding data.")
|
||||
continue
|
||||
|
||||
ad_data = task.get_ad_data()
|
||||
self._capturas_interface.insert_captura(ad_data)
|
||||
task.update_status("Captura inserted")
|
||||
logging.info("New ad inserted.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue