Skip to content

Commit

Permalink
Using get to fetch value
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishmeet Bindra committed Jan 8, 2024
1 parent 5de589b commit ff2a6c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pydanticrud/backends/dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def _get_type_possibilities(self, field_name) -> Set[tuple]:
def type_from_definition(definition_signature: Union[str, dict]) -> dict:
if isinstance(definition_signature, str):
t = definition_signature.split("/")[-1]
return self.definitions.get(t)
if t in self.definitions:
return self.definitions.get(t)
return definition_signature

type_dicts = [type_from_definition(t) for t in possible_types]
Expand Down

0 comments on commit ff2a6c2

Please sign in to comment.