Update openpype/plugins/inventory/remove_and_load.py

Changed representation assertion into a warning with more info

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
Sharkitty 2023-05-08 16:01:57 +00:00 committed by GitHub
parent 43b71e4f1e
commit 291432d49b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,10 @@ class RemoveAndLoad(InventoryAction):
representation = get_representation_by_id(
project_name, container["representation"]
)
assert representation, "Representation not found"
if not representation:
self.log.warning(
"Skipping remove and load because representation id is not"
" found in database: '{}'".format(container["representation"])
# Remove container
remove_container(container)