Skip to content

Commit

Permalink
Support projections in model get function. Fixes #337
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinner-lyft committed Nov 7, 2017
1 parent 3378da2 commit c99d500
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pynamodb/models.py
Expand Up @@ -470,7 +470,8 @@ def refresh(self, consistent_read=False):
def get(cls,
hash_key,
range_key=None,
consistent_read=False):
consistent_read=False,
attributes_to_get=None):
"""
Returns a single object using the provided keys
Expand All @@ -481,7 +482,8 @@ def get(cls,
data = cls._get_connection().get_item(
hash_key,
range_key=range_key,
consistent_read=consistent_read
consistent_read=consistent_read,
attributes_to_get=attributes_to_get
)
if data:
item_data = data.get(ITEM)
Expand Down

0 comments on commit c99d500

Please sign in to comment.