diff --git a/files/nats_registration_listener.py b/files/nats_registration_listener.py index a190beb..5170373 100644 --- a/files/nats_registration_listener.py +++ b/files/nats_registration_listener.py @@ -484,7 +484,7 @@ async def main(): "Accept": "application/json", "Authorization": f"Token {NB_TOKEN}", } - patch_body = {"custom_fields": {"action_last": action_next_str, "action_next_timestamp": now_epoch}} + patch_body = {"custom_fields": {"action_last": action_next_str, "action_next_timestamp": str(now_epoch)}} _, pcode = http_patch_json( f"{base}/api/dcim/devices/{dev_id}/", patch_body, @@ -544,7 +544,7 @@ async def main(): "Accept": "application/json", "Authorization": f"Token {NB_TOKEN}", } - patch_body = {"custom_fields": {"action_last": action_next_str, "action_next_timestamp": now_epoch}} + patch_body = {"custom_fields": {"action_last": action_next_str, "action_next_timestamp": str(now_epoch)}} _, pcode = http_patch_json( f"{base}/api/dcim/devices/{dev_id}/", patch_body,