diff --git a/frontend/src/components/recipe-mobile/recipe-edit.vue b/frontend/src/components/recipe-mobile/recipe-edit.vue index eab9d62..af50ad9 100644 --- a/frontend/src/components/recipe-mobile/recipe-edit.vue +++ b/frontend/src/components/recipe-mobile/recipe-edit.vue @@ -384,7 +384,9 @@ export default { message: 'εˆ›ε»ΊζˆεŠŸ', forbidClick: true, duration: 800, - }) + }), + (this.ingredient_name = null), + (this.ingredient_unit = null) ) ); diff --git a/recipe/views.py b/recipe/views.py index 9f85401..9dad7e5 100644 --- a/recipe/views.py +++ b/recipe/views.py @@ -18,7 +18,7 @@ class RecipeAPI(viewsets.ModelViewSet): # authentication.SessionAuthentication, # authentication.BasicAuthentication) # permission_classes = (permissions.IsAuthenticated,) - queryset = recipe.models.Recipe.objects.all() + queryset = recipe.models.Recipe.objects.order_by('-id') serializer_class = recipe.serializers.RecipeSerializer def perform_destroy(self, instance): @@ -54,7 +54,7 @@ class RecipeAPI(viewsets.ModelViewSet): return super().perform_update(serializer) 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) filterset_fields = {