Skip to content
Merged
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
Next Next commit
Add is_deleted function to CosmosDBModel class
  • Loading branch information
fabidick22 committed Jun 11, 2020
commit 80fa31e9b96a09f39f82fbd95049d79f4fc76ed4
5 changes: 5 additions & 0 deletions commons/data_access_layer/cosmos_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def __init__(self, data):
if k in names:
setattr(self, k, v)

def is_deleted(self):
if "deleted" in self.__dict__.keys():
return True if self.deleted else False
return False


def partition_key_attribute(pk: PartitionKey) -> str:
return pk.path.strip('/')
Expand Down