mirror of https://github.com/CIRCL/lookyloo
fix: Properly match 0/1 as string
parent
a2ba5c551d
commit
db9ca0ea2b
|
@ -98,12 +98,13 @@ class AsyncCapture(AbstractManager):
|
||||||
|
|
||||||
if 'auto_report' in to_capture:
|
if 'auto_report' in to_capture:
|
||||||
settings = {}
|
settings = {}
|
||||||
if isinstance(to_capture['auto_report'], int):
|
if isinstance(to_capture['auto_report'], str):
|
||||||
# auto_report was a bool in the submission, it can be 1 or 0. 0 means no.
|
if to_capture['auto_report'].isdigit():
|
||||||
if not to_capture['auto_report']:
|
# auto_report was a bool in the submission, it can be 1 or 0. 0 means no.
|
||||||
continue
|
if to_capture['auto_report'] == '0':
|
||||||
elif isinstance(to_capture['auto_report'], str):
|
continue
|
||||||
settings = json.loads(to_capture['auto_report'])
|
else:
|
||||||
|
settings = json.loads(to_capture['auto_report'])
|
||||||
elif isinstance(to_capture['auto_report'], dict):
|
elif isinstance(to_capture['auto_report'], dict):
|
||||||
settings = to_capture['auto_report']
|
settings = to_capture['auto_report']
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue