Skip to content

Commit

Permalink
Fix check instance version compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenAnpu committed Jul 9, 2024
1 parent 30a65e4 commit fd14642
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ def __init__(self, api: sly.Api, min_instance_version: str = None):
)

def check_instance_ver_compatibility(self):
if self.api.instance_version < self._min_instance_version:
if not self.api.is_version_supported(self._min_instance_version):
sly.logger.info(
f"Supervisely instance version does not support workflow features. To use them, please update your instance minimum to version {self._min_instance_version}."
f"Supervisely instance version {self.api.instance_version} does not support workflow features."
)
if not sly.is_community():
sly.logger.info(
f"To use them, please update your instance to version {self._min_instance_version} or higher."
)
return False
return True

Expand Down

0 comments on commit fd14642

Please sign in to comment.