Skip to content

refactor(views): Move get_record_requests to RecordCommunitiesService#3375

Open
sakshamarora1 wants to merge 1 commit into
inveniosoftware:masterfrom
sakshamarora1:feat/show_accepted_request
Open

refactor(views): Move get_record_requests to RecordCommunitiesService#3375
sakshamarora1 wants to merge 1 commit into
inveniosoftware:masterfrom
sakshamarora1:feat/show_accepted_request

Conversation

@sakshamarora1
Copy link
Copy Markdown
Contributor

@sakshamarora1 sakshamarora1 commented Mar 20, 2026

@sakshamarora1 sakshamarora1 force-pushed the feat/show_accepted_request branch from 0e97059 to 2bb29f3 Compare March 20, 2026 14:44
return {} # secret link users do not have permissions to search requests

# Get all accepted requests that led to the record being added to the community
parent = record._record.parent
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this bypasses the service layer. Is there any way to get the parent of the record without accessing _record?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought before about moving this whole function to the service class here in rdm-records as a service method.

Because now, we are accessing the DB here as well.
Updated the PR and moved it to the service class: inveniosoftware/invenio-rdm-records#2294

@sakshamarora1 sakshamarora1 force-pushed the feat/show_accepted_request branch from 2bb29f3 to ab70290 Compare March 31, 2026 09:17
@sakshamarora1 sakshamarora1 changed the title feat(views): Display 'accepted version' on communities tab if no request refactor(views): Move get_record_requests to RecordCommunitiesService Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"View comments" button under the community is not visible on other record versions (landing page)

4 participants