Skip to content

Commit

Permalink
Resolve CLI build bug with lower case (#2121)
Browse files Browse the repository at this point in the history
Resolve bug with lower case
  • Loading branch information
harimkang committed May 10, 2023
1 parent d5da3c2 commit dc6c671
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion otx/cli/registry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def get(self, template_id, skip_error=False):
"""Returns a model template with specified template_id or template.name."""

templates = [
template for template in self.templates if template_id in (template.model_template_id, template.name)
template
for template in self.templates
if str(template_id).upper() in (str(template.model_template_id).upper(), str(template.name).upper())
]
if not templates:
if skip_error:
Expand Down

0 comments on commit dc6c671

Please sign in to comment.