Skip to content

Commit 40763b5

Browse files
14299 change webhook timestamp to isoformat (#14331)
* 14299 change timestamp to isoformat * Omit redundant str() casting --------- Co-authored-by: Jeremy Stretch <[email protected]>
1 parent d52a6d3 commit 40763b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

netbox/core/models/jobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def trigger_webhooks(self, event):
229229
model_name=self.object_type.model,
230230
event=event,
231231
data=self.data,
232-
timestamp=str(timezone.now()),
232+
timestamp=timezone.now().isoformat(),
233233
username=self.user.username,
234234
retry=get_rq_retry()
235235
)

netbox/extras/webhooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def flush_webhooks(queue):
115115
event=data['event'],
116116
data=data['data'],
117117
snapshots=data['snapshots'],
118-
timestamp=str(timezone.now()),
118+
timestamp=timezone.now().isoformat(),
119119
username=data['username'],
120120
request_id=data['request_id'],
121121
retry=get_rq_retry()

0 commit comments

Comments
 (0)