Declarative templates (#266)

This commit is contained in:
bmc-msft
2020-11-17 16:00:09 -05:00
committed by GitHub
parent ce3356d597
commit 64bd389eb7
40 changed files with 2111 additions and 69 deletions

View File

@ -309,7 +309,9 @@ class ORMMixin(ModelMixin):
try:
self.etag = client.insert_entity(self.table_name(), raw)
except AzureConflictHttpError:
return Error(code=ErrorCode.UNABLE_TO_CREATE, errors=["row exists"])
return Error(
code=ErrorCode.UNABLE_TO_CREATE, errors=["entry already exists"]
)
elif self.etag and require_etag:
self.etag = client.replace_entity(
self.table_name(), raw, if_match=self.etag