Skip to content

Commit 63c65ea

Browse files
committed
fix: move self.to_json() outside with block
1 parent 2fc0dd0 commit 63c65ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tagstudio/src/core/library.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,12 +799,13 @@ def save_library_to_disk(self):
799799

800800
self.verify_ts_folders()
801801

802+
json_library: JsonLibary = self.to_json()
802803
with open(
803804
self.library_dir / TS_FOLDER_NAME / filename, "w", encoding="utf-8"
804805
) as outfile:
805806
outfile.flush()
806807
ujson.dump(
807-
self.to_json(),
808+
json_library,
808809
outfile,
809810
ensure_ascii=False,
810811
escape_forward_slashes=False,

0 commit comments

Comments
 (0)