Skip to content

Commit

Permalink
Stub out datatype class #10552
Browse files Browse the repository at this point in the history
  • Loading branch information
chiatt committed Jan 31, 2024
1 parent 7f59fac commit 8f4289a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions arches/app/datatypes/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2565,3 +2565,28 @@ def get_value_from_jsonld(json_ld_node):
return
except IndexError as e:
return


class ReferenceDataType(BaseDataType):
def validate(self, value, row_number=None, source="", node=None, nodeid=None, strict=False, **kwargs):
errors = []
return errors

def transform_value_for_tile(self, value, **kwargs):
ret = []
return ret

def transform_export_values(self, value, *args, **kwargs):
new_values = []
return ",".join(new_values)

def get_display_value(self, tile, node, **kwargs):
new_values = []
return ",".join(new_values)

def to_json(self, tile, node):
new_values = []
return json.dumps({"text":new_values})

def collects_multiple_values(self):
return True

0 comments on commit 8f4289a

Please sign in to comment.