swh.deposit.api.private.deposit_update_status module#

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

Bases: APIPrivateView, APIPut

Deposit request class to update the deposit’s status.

HTTP verbs supported: PUT

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

parser_classes = (<class 'rest_framework.parsers.JSONParser'>,)#
additional_checks(request, headers: ParsedRequestHeaders, collection_name, deposit=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: ParsedRequestHeaders, collection_name: str, deposit: Deposit) None[source]#

Update the deposit with status and SWHIDs

Returns:

204 No content 400 Bad request if checks fail