make tag name map fix more readable
I think this version of the fix is more readable
This commit is contained in:
parent
607d4889d6
commit
ea78dff2f2
@ -520,11 +520,9 @@ class DictionaryDb(DbGeneric):
|
|||||||
emit = None
|
emit = None
|
||||||
if tag.handle in self.tag_map:
|
if tag.handle in self.tag_map:
|
||||||
emit = "tag-update"
|
emit = "tag-update"
|
||||||
existing_names = [existing_name for existing_name, existing_tag in
|
for old_name, old_tag in list(self._tag_name_dict.items()):
|
||||||
self._tag_name_dict.items()
|
if old_tag.handle == tag.handle:
|
||||||
if existing_tag.handle == tag.handle]
|
del self._tag_name_dict[old_name]
|
||||||
for existing_name in existing_names:
|
|
||||||
del self._tag_name_dict[existing_name]
|
|
||||||
self._tag_dict[tag.handle] = tag
|
self._tag_dict[tag.handle] = tag
|
||||||
self._tag_name_dict[tag.name] = tag
|
self._tag_name_dict[tag.name] = tag
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user