Skip to content

Commit 46ff942

Browse files
authored
Fix: Allow T&C field for hold-tier (coco edge case) (#125)
1 parent e54188e commit 46ff942

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

aleph_message/models/execution/instance.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def check_requirements(cls, values):
5050
):
5151
raise ValueError("GPU option is only supported for QEmu hypervisor")
5252

53-
# Terms and conditions filter only supported for stream payments with node_hash assigned
53+
# Terms and conditions filter only supported for PAYG/coco instances with node_hash assigned
5454
if (
5555
values.get("requirements").node
5656
and values.get("requirements").node.terms_and_conditions
@@ -60,9 +60,12 @@ def check_requirements(cls, values):
6060
"Terms_and_conditions field needs a requirements.node.node_hash value"
6161
)
6262

63-
if not values.get("payment").is_stream:
63+
if (
64+
not values.get("payment").is_stream
65+
and not values.get("environment").trusted_execution
66+
):
6467
raise ValueError(
65-
"Only PAYG/stream instances can have a terms_and_conditions"
68+
"Only PAYG/coco instances can have a terms_and_conditions"
6669
)
6770

6871
return values

0 commit comments

Comments
 (0)