public function updateAction(Dropzone $dropzone, Request $request)
    {
        $this->checkPermission('EDIT', $dropzone->getResourceNode(), [], true);

        try {
            $this->manager->update($dropzone, json_decode($request->getContent(), true));

            $closedDropStates = [
                Dropzone::STATE_FINISHED,
                Dropzone::STATE_PEER_REVIEW,
                Dropzone::STATE_WAITING_FOR_PEER_REVIEW,
            ];

            if (!$dropzone->getDropClosed() && $dropzone->getManualPlanning() && in_array($dropzone->getManualState(), $closedDropStates)) {
                $this->manager->closeAllUnfinishedDrops($dropzone);
            }

            return new JsonResponse($this->manager->serialize($dropzone));
        } catch (\Exception $e) {
            return new JsonResponse($e->getMessage(), 422);
        }
    }