Skip to content

Commit

Permalink
service: fix request ID passing
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Jun 28, 2024
1 parent 87180c1 commit 34220c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions invenio_requests/services/events/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def create(
event = self.record_cls.create(
{},
request=request.model,
request_id=str(request_id),
request_id=str(request.id),
type=event_type,
)
event.update(data)
Expand Down Expand Up @@ -204,7 +204,7 @@ def search(
params,
search_preference,
permission_action="unused",
extra_filter=dsl.Q("term", request_id=str(request_id)),
extra_filter=dsl.Q("term", request_id=str(request.id)),
**kwargs,
)
search_result = search.execute()
Expand All @@ -216,7 +216,7 @@ def search(
params,
links_tpl=LinksTemplate(
self.config.links_search,
context={"request_id": request_id, "args": params},
context={"request_id": str(request.id), "args": params},
),
links_item_tpl=self.links_item_tpl,
expandable_fields=self.expandable_fields,
Expand Down

0 comments on commit 34220c9

Please sign in to comment.