Skip to content

Commit 191ed29

Browse files
committed
fix(BUILD_URL macro): only add url if url was successfully built
1 parent a12e3cb commit 191ed29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tagstudio/src/qt/ts_qt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,8 @@ def run_macro(self, name: MacroID, grid_idx: int):
816816

817817
elif name == MacroID.BUILD_URL:
818818
url = TagStudioCore.build_url(entry, source)
819-
self.lib.add_entry_field_type(entry.id, field_id=_FieldID.SOURCE, value=url)
819+
if url is not None:
820+
self.lib.add_entry_field_type(entry.id, field_id=_FieldID.SOURCE, value=url)
820821
elif name == MacroID.MATCH:
821822
TagStudioCore.match_conditions(self.lib, entry.id)
822823
elif name == MacroID.CLEAN_URL:

0 commit comments

Comments
 (0)