Skip to content

Commit

Permalink
chg: [website] API - Bundles. Use .isoformat instead of using strftime.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Nov 19, 2024
1 parent 8efb66f commit a4defc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/web/api/v1/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def post(self) -> Tuple[ResultType, int]:
bundle = bundle_ns.payload
bundle["uuid"] = bundle.get("uuid", str(uuid.uuid4()))
bundle["vulnerability_lookup_origin"] = local_instance_uuid
bundle["creation_timestamp"] = current_time.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
bundle["timestamp"] = current_time.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
bundle["creation_timestamp"] = current_time.isoformat()
bundle["timestamp"] = current_time.isoformat()
# Find security advisories IDs in the description and add the result to the related vulnerabilities
bundle.setdefault("related_vulnerabilities", [])
bundle.get("related_vulnerabilities", []).extend(
Expand Down

0 comments on commit a4defc2

Please sign in to comment.