From b0ca1176327877dc08806c6baa36113c2296e54c Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Fri, 1 May 2020 14:48:30 -0700 Subject: [PATCH] Update sdk/search/azure-search-documents/azure/search/documents/_service/_utils.py --- .../azure/search/documents/_service/_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_service/_utils.py b/sdk/search/azure-search-documents/azure/search/documents/_service/_utils.py index 058a52462d7c..2e0a22a57c9a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_service/_utils.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_service/_utils.py @@ -167,7 +167,11 @@ def get_access_conditions(model, match_condition=MatchConditions.Unconditionally 404: ResourceNotFoundError } - if not hasattr(model, 'e_tag'): + try: + _unicode_type = unicode + except NameError: + _unicode_type = str + if isinstance(model, _unicode_type): return (error_map, None) try: