api: persistence allow path prefix
This commit is contained in:
@@ -105,13 +105,12 @@ def get_inventory_exclusive(value: dict, inventory_file_name: str) -> bool | Non
|
|||||||
if "__this" not in value:
|
if "__this" not in value:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
definition_locations = value.get("__this", {}).get("files")
|
definition_locations: list[str] = value.get("__this", {}).get("files")
|
||||||
if not definition_locations:
|
if not definition_locations:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return (
|
return len(definition_locations) == 1 and definition_locations[0].endswith(
|
||||||
len(definition_locations) == 1
|
inventory_file_name
|
||||||
and definition_locations[0] == inventory_file_name
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user