Skip to content

Commit

Permalink
Permit sending reference DT tile values with just "value"
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Nov 19, 2024
1 parent ff979ac commit b41ba4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arches_references/datatypes/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ def validate(

def transform_value_for_tile(self, value, **kwargs):
list_id = kwargs.get("controlledList")
if (
isinstance(value, list)
and isinstance(value[0], dict)
and "value" in value[0]
):
value = value[0]["value"]
if isinstance(value, str):
found_item = self.lookup_listitem_from_label(value, list_id)
if found_item:
Expand Down

0 comments on commit b41ba4c

Please sign in to comment.