Skip to content

DeactivateActionViewSetMixin ​

Overview ​

A ViewSet mixin that allows you to deactivate a model inheriting from ActivatableBaseModel.

A bulk request names its rows in a pks body. VuedaViewSet.get_bulk_queryset converts the keys and applies the row-level and object permission checks for update, the checks that a single-object request makes. A key that names no row, or a row that the request may not change, answers 400 before anything changes.

Both actions consult get_warnings_for_object/get_warnings (provided by WarningConfirmationMixin, so any VuedaViewSet) after validation and before the write, gating the write behind a 409 confirmation when warnings are reported.

activate ​

Signature ​

activate(self, request, pk)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
pknoNone

Source ​

server/vueda/core/viewsets/__init__.py:1529

deactivate ​

Signature ​

deactivate(self, request, pk)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
pknoNone

Source ​

server/vueda/core/viewsets/__init__.py:1486

Source ​

server/vueda/core/viewsets/__init__.py:1472