Merge branch 'release/r2022-02-13a'
This commit is contained in:
commit
36b730a5ac
@ -384,7 +384,9 @@ export default {
|
|||||||
message: '创建成功',
|
message: '创建成功',
|
||||||
forbidClick: true,
|
forbidClick: true,
|
||||||
duration: 800,
|
duration: 800,
|
||||||
})
|
}),
|
||||||
|
(this.ingredient_name = null),
|
||||||
|
(this.ingredient_unit = null)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class RecipeAPI(viewsets.ModelViewSet):
|
|||||||
# authentication.SessionAuthentication,
|
# authentication.SessionAuthentication,
|
||||||
# authentication.BasicAuthentication)
|
# authentication.BasicAuthentication)
|
||||||
# permission_classes = (permissions.IsAuthenticated,)
|
# permission_classes = (permissions.IsAuthenticated,)
|
||||||
queryset = recipe.models.Recipe.objects.all()
|
queryset = recipe.models.Recipe.objects.order_by('-id')
|
||||||
serializer_class = recipe.serializers.RecipeSerializer
|
serializer_class = recipe.serializers.RecipeSerializer
|
||||||
|
|
||||||
def perform_destroy(self, instance):
|
def perform_destroy(self, instance):
|
||||||
@ -54,7 +54,7 @@ class RecipeAPI(viewsets.ModelViewSet):
|
|||||||
return super().perform_update(serializer)
|
return super().perform_update(serializer)
|
||||||
|
|
||||||
def list(self, request, *args, **kwargs):
|
def list(self, request, *args, **kwargs):
|
||||||
self.queryset = recipe.models.Recipe.objects.exclude(status=const.RECIPE_STATUS_DELETED)
|
self.queryset = self.queryset.exclude(status=const.RECIPE_STATUS_DELETED)
|
||||||
return super().list(request, *args, **kwargs)
|
return super().list(request, *args, **kwargs)
|
||||||
|
|
||||||
filterset_fields = {
|
filterset_fields = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user