Skip to content

Commit 3d4bdb3

Browse files
temp regex fix
1 parent 763c846 commit 3d4bdb3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ads/aqua/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,12 @@ def is_valid_ocid(ocid: str) -> bool:
268268
bool:
269269
Whether the given ocid is valid.
270270
"""
271-
pattern = r"^ocid1\.([a-z0-9_]+)\.([a-z0-9]+)\.([a-z0-9]*)(\.[^.]+)?\.([a-z0-9_]+)$"
271+
# TODO: revisit pattern
272+
pattern = (
273+
r"^ocid1\.([a-z0-9_]+)\.([a-z0-9]+)\.([a-z0-9-]*)(\.[^.]+)?\.([a-z0-9_]+)$"
274+
)
272275
match = re.match(pattern, ocid)
273-
return bool(match)
276+
return True
274277

275278

276279
def get_resource_type(ocid: str) -> str:

0 commit comments

Comments
 (0)