Merge remote-tracking branch 'origin/bugfix/OP-6952_Resolve-broken-version-management-for-loaded-containers' into bugfix/OP-6952_Resolve-broken-version-management-for-loaded-containers

This commit is contained in:
Jakub Jezek 2023-10-06 15:30:55 +02:00
commit d36593f2d9
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -240,11 +240,8 @@ def create_media_pool_item(
for file in glob.glob(os.path.join(dir_path, base_name)):
files.append(file)
# iterate all files and check if they exists
# if not then remove them from list
for file in files[:]:
if not os.path.exists(file):
files.remove(file)
# keep only existing files
files = [f for f in files if os.path.exists(f)]
# add all data in folder to media pool
media_pool_items = media_pool.ImportMedia(files)