mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-01 07:39:10 +00:00
(fix): use .get() to avoid KeyError (#347)
This commit is contained in:
committed by
GitHub
parent
ce87b11fbd
commit
ec960f2372
@@ -61,7 +61,7 @@ def folders_to_tags(library: Library):
|
||||
library.add_tag_to_library(new_tag)
|
||||
branch["dirs"][folder] = dict(dirs={}, tag=new_tag)
|
||||
branch = branch["dirs"][folder]
|
||||
return branch["tag"]
|
||||
return branch.get("tag")
|
||||
|
||||
for tag in library.tags:
|
||||
reversed_tag = reverse_tag(library, tag, None)
|
||||
|
||||
Reference in New Issue
Block a user