From f563d092bcddd1c29a0f04d1434a65ee19b2714e Mon Sep 17 00:00:00 2001 From: David Michaels Date: Thu, 11 Jan 2024 13:37:52 -0500 Subject: [PATCH] very minor update to portal_utils.Portal.is_schema_type; type check --- dcicutils/portal_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dcicutils/portal_utils.py b/dcicutils/portal_utils.py index 5f464c481..3f9c06149 100644 --- a/dcicutils/portal_utils.py +++ b/dcicutils/portal_utils.py @@ -298,6 +298,8 @@ def is_schema_type(self, schema_name_or_object: Union[str, dict], target_schema_ """ if isinstance(schema_name_or_object, dict): return self.isinstance_schema(schema_name_or_object, target_schema_name) + elif not isinstance(schema_name_or_object, str) or not schema_name_or_object: + return False schema_name = self.schema_name(schema_name_or_object).lower() target_schema_name = self.schema_name(target_schema_name).lower() if schema_name == target_schema_name: