Skip to content

Commit 7f6efe4

Browse files
committed
update pattern propagation
1 parent 0304a82 commit 7f6efe4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

synapseclient/extensions/curator/schema_generation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4865,7 +4865,7 @@ def __post_init__(self) -> None:
48654865
msg = (
48664866
f"A regex validation rule is set for property: {self.name}, but the pattern is not set in the data model. "
48674867
f"The regex pattern will be set to {self.pattern}, but the regex rule is deprecated and validation "
4868-
"rules will no longer be used in the future."
4868+
"rules will no longer be used in the future. "
48694869
"Please explicitly set the regex pattern in the 'Pattern' column in the data model."
48704870
)
48714871
self.logger.warning(msg)
@@ -5500,6 +5500,9 @@ def _set_property(
55005500
else:
55015501
prop = _create_simple_property(node)
55025502

5503+
if node.pattern:
5504+
prop["pattern"] = node.pattern
5505+
55035506
prop["description"] = node.description
55045507
prop["title"] = node.display_name
55055508
schema_property = {node_name: prop}

0 commit comments

Comments
 (0)