From 25b489b4d8968bb7b53b6adb40955337358a2c0d Mon Sep 17 00:00:00 2001 From: "Marcel R." Date: Mon, 23 Dec 2024 13:10:08 +0100 Subject: [PATCH] Add optional_existing attribute to target collections. --- law/target/collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/law/target/collection.py b/law/target/collection.py index f3c8da1e..eb559e71 100644 --- a/law/target/collection.py +++ b/law/target/collection.py @@ -289,7 +289,7 @@ class SiblingFileCollectionBase(FileCollection): @classmethod def _exists_in_basenames(cls, target, basenames, optional_existing, target_dirs): - if optional_existing is not None and target.optional: + if optional_existing not in (None, no_value) and target.optional: return optional_existing if isinstance(target, SiblingFileCollectionBase): return target._exists_fwd(