Skip to content

Commit f64d3bc

Browse files
committed
feat: migrate to new automate sdk version
1 parent d7b06fa commit f64d3bc

File tree

3 files changed

+255
-237
lines changed

3 files changed

+255
-237
lines changed

main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ def automate_function(
5151
if b.speckle_type == function_inputs.forbidden_speckle_type:
5252
if not b.id:
5353
raise ValueError("Cannot operate on objects without their id's.")
54-
automate_context.add_object_error(
55-
b.id,
56-
"This project should not contain the type: " f"{b.speckle_type}",
54+
55+
automate_context.attach_error_to_objects(
56+
category="Forbidden speckle_type",
57+
object_ids=b.id,
58+
message="This project should not contain the type: "
59+
f"{b.speckle_type}",
5760
)
5861
count += 1
5962

0 commit comments

Comments
 (0)