fix: Make sure listing setting is properly handled.

pull/926/head
Raphaël Vinot 2024-07-19 01:14:32 +02:00 committed by GitHub
parent ff8ec51ef2
commit 40ad6d0031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -82,10 +82,10 @@ class AsyncCapture(AbstractManager):
if get_config('generic', 'default_public'):
# By default, the captures are on the index, unless the user mark them as un-listed
listing = False if ('listing' in to_capture and isinstance(to_capture['listing'], str) and to_capture['listing'].lower() in ['false', '0', '']) else True
listing = False if ('listing' in to_capture and to_capture['listing'] == 0) else True
else:
# By default, the captures are not on the index, unless the user mark them as listed
listing = True if ('listing' in to_capture and isinstance(to_capture['listing'], str) and to_capture['listing'].lower() in ['true', '1']) else False
listing = True if ('listing' in to_capture and to_capture['listing'] == 1) else False
self.lookyloo.store_capture(
uuid, listing,