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: swh.deposit.api.common.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: swh.deposit.api.common.ParsedRequestHeaders, collection_name: str, deposit: swh.deposit.models.Deposit) → None[source]

Update the deposit with status and SWHIDs


204 No content 400 Bad request if checks fail

config: Dict[str, Any]
scheduler: SchedulerInterface
storage_metadata: StorageInterface