File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
synapseclient/extensions/curator Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2893,6 +2893,7 @@ def define_data_model_relationships(self) -> dict:
28932893 allowed_values: A list of values the entry must be one of
28942894 edge_dir: str, 'in'/'out' is the edge an in or out edge. Define for edge relationships
28952895 jsonld_dir: str, 'in'/out is the direction in or out in the JSONLD.
2896+ pattern: regex pattern that the entry must match
28962897 """
28972898 map_data_model_relationships = {
28982899 "displayName" : {
@@ -4866,6 +4867,14 @@ def __post_init__(self) -> None:
48664867 )
48674868 self .logger .warning (msg )
48684869
4870+ if self .pattern :
4871+ try :
4872+ re .compile (self .pattern )
4873+ except re .error as e :
4874+ raise ValueError (
4875+ f"The regex pattern '{ self .pattern } ' for property '{ self .name } ' is invalid."
4876+ ) from e
4877+
48694878 def _determine_type_and_array (
48704879 self , column_type : Optional [ColumnType ]
48714880 ) -> tuple [Optional [AtomicColumnType ], Optional [bool ]]:
You can’t perform that action at this time.
0 commit comments