Skip to content

Commit

Permalink
Add Document.is_new()
Browse files Browse the repository at this point in the history
Signed-off-by: alexgurrola <[email protected]>
  • Loading branch information
alexgurrola committed Aug 5, 2019
1 parent dfc1049 commit 26c6a34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions snakelet/storage/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ def __add_meta__(self, key, type):
self.__meta__[key] = type
return
"""

def is_new(self):
return self.get('_id') is None

0 comments on commit 26c6a34

Please sign in to comment.