Skip to content

Commit 53f214e

Browse files
authored
Merge pull request #705 from rackerlabs/sync-provision-state-20250220
fix(understack-workflows): don't try to set nautobot status if it doesn't exist
2 parents 645aec9 + 19ced87 commit 53f214e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/understack-workflows/understack_workflows/main/sync_provision_state.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ def do_action(
4141
"ironic_provision_state": provision_state,
4242
"resource_class": resource_class,
4343
}
44-
nautobot.update_cf(
45-
device_id=device_uuid, tenant_id=tenant_id, fields=custom_fields_to_update
46-
)
4744

4845
if new_status:
46+
nautobot.update_cf(
47+
device_id=device_uuid, tenant_id=tenant_id, fields=custom_fields_to_update
48+
)
4949
nautobot.update_device_status(device_uuid, new_status)
5050

5151

0 commit comments

Comments
 (0)