Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pynamodb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,8 @@ def get(
attributes_to_get=attributes_to_get,
)
if data:
item_data = data.get(ITEM)
if item_data:
return cls.from_raw_data(item_data)
if ITEM in data:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably if data and ITEM in data:

return cls.from_raw_data(data.get(ITEM))
raise cls.DoesNotExist()

@classmethod
Expand Down