safer data access

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
Jakub Trllo 2023-02-24 10:20:40 +01:00
parent 7a8aa123ff
commit 8180076c08

View file

@ -100,7 +100,7 @@ class LoaderPlugin(list):
ext = repre_context.get("ext")
if not ext:
# Legacy way how to get extensions
path = repre_doc["data"].get("path")
path = repre_doc.get("data", {}).get("path")
if not path:
cls.log.info(
"Representation doesn't have known source of extension"