File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
sdk/search/azure-search-documents/samples Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,9 @@ async def get_synonym_map():
5555 # [START get_synonym_map_async]
5656 result = await client .get_synonym_map ("test-syn-map" )
5757 print ("Retrived Synonym Map 'test-syn-map' with synonyms" )
58- for syn in result .synonyms :
59- print (" {}" .format (syn ))
58+ if result :
59+ for syn in result .synonyms :
60+ print (" {}" .format (syn ))
6061 # [END get_synonym_map_async]
6162
6263
Original file line number Diff line number Diff line change @@ -69,8 +69,9 @@ def get_synonym_map():
6969 # [START get_synonym_map]
7070 result = client .get_synonym_map ("test-syn-map" )
7171 print ("Retrived Synonym Map 'test-syn-map' with synonyms" )
72- for syn in result .synonyms :
73- print (" {}" .format (syn ))
72+ if result :
73+ for syn in result .synonyms :
74+ print (" {}" .format (syn ))
7475 # [END get_synonym_map]
7576
7677
You can’t perform that action at this time.
0 commit comments