Skip to content
Snippets Groups Projects
Commit 2215ac56 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

doc

parent 9d00c13d
No related branches found
No related tags found
2 merge requests!22Release 0.3,!14F fix list
Pipeline #10434 passed with warnings
......@@ -35,11 +35,11 @@ responsible:
revisionOf:
datatype: REFERENCE
results:
datatype: REFERENCE
datatype: LIST<REFERENCE>
sources:
datatype: REFERENCE
datatype: LIST<REFERENCE>
scripts:
datatype: REFERENCE
datatype: LIST<REFERENCE>
Simulation:
obligatory_properties:
date:
......
......@@ -50,7 +50,11 @@ def _get_listdatatype(dtype):
returns the type within the list or None, if it cannot be matched with a
list definition
"""
match = re.match(r"^LIST[(](?P<dt>.*)[)]$", dtype)
# TODO: string representation should be the same as used by the server:
# e.g. LIST<TEXT>
# this should be changed in the module and the old behavour should be
# marked as depricated
match = re.match(r"^LIST[(<](?P<dt>.*)[)>]$", dtype)
if match is None:
return None
......
......@@ -202,12 +202,16 @@ RT1:
datatype: LIST(RT2)
b:
datatype: LIST(TEXT)
c:
datatype: LIST<TEXT>
RT2:
"""
model = parse_model_from_yaml(to_file(string))
self.assertTrue(isinstance(model['b'], db.Property))
self.assertEqual(model['b'].datatype, db.LIST(db.TEXT))
self.assertTrue(isinstance(model['c'], db.Property))
self.assertEqual(model['c'].datatype, db.LIST(db.TEXT))
# This failed for an older version of caosdb-models
string_list = """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment