Skip to content

Commit

Permalink
Updated default uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
k-macmillan committed Dec 2, 2024
1 parent 98c82df commit 5b89d48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/notifications/process_notifications.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import uuid
from datetime import datetime

from flask import current_app
from flask import current_app, g
from celery import chain

from notifications_utils.clients import redis
Expand Down Expand Up @@ -92,7 +92,8 @@ def persist_notification(
notification_created_at = created_at or datetime.utcnow()

if notification_id is None:
notification_id = uuid.uuid4()
# utils sets this so we can unify logging
notification_id = g.request_id if getattr(g, 'request_id', '') else uuid.uuid4()

notification = Notification(
id=notification_id,
Expand Down

0 comments on commit 5b89d48

Please sign in to comment.