Skip to content

Commit

Permalink
very minor update to portal_utils.Portal.is_schema_type; type check
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jan 11, 2024
1 parent 40f21a6 commit f563d09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dcicutils/portal_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f563d09

Please sign in to comment.