inveniosoftware / invenio-communities

Invenio communities module.
https://invenio-communities.readthedocs.io
MIT License
5 stars 72 forks source link

self_html link in community requests is wrong #1228

Open tmorrell opened 1 month ago

tmorrell commented 1 month ago

Package version (if known): v12

Describe the bug

The self_html link in a requests API results in a 404 because it is missing the community path. Example https://inveniordm.web.cern.ch/api/requests/52636814-f66c-4330-b9ed-5e15ee1eda80 has self_html: "https://inveniordm.web.cern.ch/requests/52636814-f66c-4330-b9ed-5e15ee1eda80". Working links are either https://inveniordm.web.cern.ch/me/requests/52636814-f66c-4330-b9ed-5e15ee1eda80 or https://inveniordm.web.cern.ch/communities/testing/requests/52636814-f66c-4330-b9ed-5e15ee1eda80

Steps to Reproduce

  1. Create a community submission
  2. Got to /api/requests/ with the request id
  3. Click on the self_html link
  4. See error

Expected behavior

The /me/requests/ path seems like a easier fix, though it might not work for individuals with just community permissions.

Screenshots (if applicable)

Additional context