Skip to content

Commit

Permalink
feat: migrate to new automate sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska committed Oct 12, 2023
1 parent d7b06fa commit f64d3bc
Show file tree
Hide file tree
Showing 3 changed files with 255 additions and 237 deletions.
9 changes: 6 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ def automate_function(
if b.speckle_type == function_inputs.forbidden_speckle_type:
if not b.id:
raise ValueError("Cannot operate on objects without their id's.")
automate_context.add_object_error(
b.id,
"This project should not contain the type: " f"{b.speckle_type}",

automate_context.attach_error_to_objects(
category="Forbidden speckle_type",
object_ids=b.id,
message="This project should not contain the type: "
f"{b.speckle_type}",
)
count += 1

Expand Down
Loading

0 comments on commit f64d3bc

Please sign in to comment.