feat(nodes): warn if node has no version specified; fall back on 1.0.0

This commit is contained in:
psychedelicious 2023-11-25 21:40:12 +11:00
parent 858bcdd3ff
commit 514c49d946
2 changed files with 4 additions and 1 deletions

View File

@ -811,6 +811,9 @@ def invocation(
except ValueError as e:
raise InvalidVersionError(f'Invalid version string for node "{invocation_type}": "{version}"') from e
cls.UIConfig.version = version
else:
logger.warn(f'No version specified for node "{invocation_type}", using "1.0.0"')
cls.UIConfig.version = "1.0.0"
if use_cache is not None:
cls.model_fields["use_cache"].default = use_cache

View File

@ -188,7 +188,7 @@ class GraphInvocationOutput(BaseInvocationOutput):
# TODO: Fill this out and move to invocations
@invocation("graph")
@invocation("graph", version="1.0.0")
class GraphInvocation(BaseInvocation):
"""Execute a graph"""