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
|
||||
if tag.handle in self.tag_map:
|
||||
emit = "tag-update"
|
||||
existing_names = [existing_name for existing_name, existing_tag in
|
||||
self._tag_name_dict.items()
|
||||
if existing_tag.handle == tag.handle]
|
||||
for existing_name in existing_names:
|
||||
del self._tag_name_dict[existing_name]
|
||||
for old_name, old_tag in list(self._tag_name_dict.items()):
|
||||
if old_tag.handle == tag.handle:
|
||||
del self._tag_name_dict[old_name]
|
||||
self._tag_dict[tag.handle] = tag
|
||||
self._tag_name_dict[tag.name] = tag
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user