swh.deposit.api.private.deposit_update_status module

class swh.deposit.api.private.deposit_update_status.APIUpdateStatus[source]

Bases: swh.deposit.api.private.APIPrivateView, swh.deposit.api.common.APIPut

Deposit request class to update the deposit’s status.

HTTP verbs supported: PUT

parser_classes = (<class 'rest_framework.parsers.JSONParser'>,)
additional_checks(request, headers, collection_name, deposit_id=None)[source]

Enrich existing checks to the default ones.

New checks: - Ensure the status is provided - Ensure it exists - no missing information on load success update

process_put(request, headers: Dict, collection_name: str, deposit_id: int) → Dict[source]

Update the deposit with status and SWHIDs

Returns

204 No content 400 Bad request if checks fail