fix: [items source] fix empty sources list

This commit is contained in:
Terrtia 2023-08-29 11:59:39 +02:00
parent 546d6538fd
commit 24969610cc
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -209,7 +209,10 @@ def _get_dir_source_name(directory, source_name=None, l_sources_name=set(), filt
l_dir = os.listdir(directory)
# empty directory
if not l_dir:
return l_sources_name.add(source_name)
if source_name:
return l_sources_name.add(source_name)
else:
return l_sources_name
else:
for src_name in l_dir:
if len(src_name) == 4: