Fixed an issue when importing tags

Fixed an issue where if the link generation returned None a crash would occur.
dev
Peery 3 years ago
parent 79d1930146
commit d78c00ddf4

@ -371,14 +371,14 @@ class ImporterWindow(ArtnetMainWindow):
"""
self.ui.link_label.setText(ImporterWindow.UNKNOWN_LINK)
if validators.url(link):
if link is not None and validators.url(link):
self.curr_link = link
self.data_changed = True
hyperlink = "<a href=\"{0}\">{1}</a>".format(link, "Source")
self.ui.link_label.setText(hyperlink)
self.ui.link_label.setToolTip(link)
return link
elif len(link) == 0:
elif link is None or len(link) == 0:
return ""
else:
self.ui.link_label.setText(ImporterWindow.UNKNOWN_LINK)

Loading…
Cancel
Save