Skip to content

Commit

Permalink
Add pre_tile_save to urldatatype and move fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SDScandrettKint committed Mar 7, 2024
1 parent c98045b commit 7684842
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arches/app/datatypes/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ def validate(self, value, row_number=None, source=None, node=None, nodeid=None,
title = _("No URL added")
error_message = self.create_error_message(value, source, row_number, message, title)
errors.append(error_message)

if "url_label" not in value:
value["url_label"] = ""

return errors

Expand Down Expand Up @@ -267,3 +264,10 @@ def default_es_mapping(self):
},
}
}

def pre_tile_save(self, tile, nodeid):
try:
if "url_label" not in tile.data[nodeid]:
tile.data[nodeid]["url_label"] = ""
except AttributeError:
pass

0 comments on commit 7684842

Please sign in to comment.