Deleting from an unknown table raises error

If the table exists then we deletes are idempotent
This commit is contained in:
Jack Danger Canty 2017-05-08 17:25:59 -10:00
commit 8e3d46fb05
3 changed files with 8 additions and 2 deletions

View file

@ -659,7 +659,7 @@ class DynamoDBBackend(BaseBackend):
return item
def delete_item(self, table_name, keys):
table = self.tables.get(table_name)
table = self.get_table(table_name)
if not table:
return None
hash_key, range_key = self.get_keys_value(table, keys)