Compare field names in a case-insensitive manner (#242)

This commit is contained in:
abdo 2021-03-14 03:10:58 +03:00 committed by GitHub
parent 9a18ae0b11
commit 2081330c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,8 +210,10 @@ class AnkiConnect:
ankiNote.tags = note['tags']
for name, value in note['fields'].items():
if name in ankiNote:
ankiNote[name] = value
for ankiName in ankiNote.keys():
if name.lower() == ankiName.lower():
ankiNote[ankiName] = value
break
allowDuplicate = False
duplicateScope = None