You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On POST calls, since request.view_args['pid_value'] is not part of the url (/api/deposit/depositions), the detected deposit class always falls back to invenio_deposit.api.Deposit, causing any additional action links added using the invenio_deposit.urils.mark_as_action decorator to be skipped.
Perhaps adding a pid_type -> deposit_class mapping as part of a current_records_rest.default_pid_classes might help to determine the desired default:
Update: This issue leads to incorrect links generation which is extremely problematic when there are additional actions implemented in a deposit class, and responses have to be consumed by a Javascript UI application. Example:
(assume we have a custom deposit class with a MyDeposit.custom_action)
Client does POST /api/deposit/depositions, gets back depid: 1234 and links with missing custom_action link.
Client wants to perform custom_action, but link is missing...
Client "reloads" the page (i.e. refetches /api/deposit/depositions/1234), which now contains the missing custom_action link.
The text was updated successfully, but these errors were encountered:
On POST calls, since
request.view_args['pid_value']
is not part of the url (/api/deposit/depositions
), the detected deposit class always falls back toinvenio_deposit.api.Deposit
, causing any additional action links added using theinvenio_deposit.urils.mark_as_action
decorator to be skipped.Perhaps adding a
pid_type -> deposit_class
mapping as part of acurrent_records_rest.default_pid_classes
might help to determine the desired default:Update: This issue leads to incorrect
links
generation which is extremely problematic when there are additional actions implemented in a deposit class, and responses have to be consumed by a Javascript UI application. Example:MyDeposit.custom_action
)POST /api/deposit/depositions
, gets backdepid: 1234
andlinks
with missingcustom_action
link.custom_action
, but link is missing.../api/deposit/depositions/1234
), which now contains the missingcustom_action
link.The text was updated successfully, but these errors were encountered: