basic test stuff

This commit is contained in:
vabene1111
2021-02-20 22:56:29 +01:00
parent d7675d4b80
commit 58c6077925
15 changed files with 40 additions and 17 deletions

View File

@@ -312,6 +312,10 @@ class RecipeViewSet(viewsets.ModelViewSet, StandardFilterMixin):
)
def image(self, request, pk):
obj = self.get_object()
if obj.get_space() != request.space:
raise PermissionDenied(detail='You do not have the required permission to perform this action', code=403)
serializer = self.serializer_class(
obj, data=request.data, partial=True
)