14299 change webhook timestamp to isoformat (#14331)

* 14299 change timestamp to isoformat

* Omit redundant str() casting

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Arthur Hanson 2023-11-28 14:01:03 -08:00 committed by GitHub
parent d52a6d3b10
commit 40763b58bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ class Job(models.Model):
model_name=self.object_type.model, model_name=self.object_type.model,
event=event, event=event,
data=self.data, data=self.data,
timestamp=str(timezone.now()), timestamp=timezone.now().isoformat(),
username=self.user.username, username=self.user.username,
retry=get_rq_retry() retry=get_rq_retry()
) )

View File

@ -115,7 +115,7 @@ def flush_webhooks(queue):
event=data['event'], event=data['event'],
data=data['data'], data=data['data'],
snapshots=data['snapshots'], snapshots=data['snapshots'],
timestamp=str(timezone.now()), timestamp=timezone.now().isoformat(),
username=data['username'], username=data['username'],
request_id=data['request_id'], request_id=data['request_id'],
retry=get_rq_retry() retry=get_rq_retry()