diff --git a/cookbook/serializer.py b/cookbook/serializer.py index 19582969..d3c5d032 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -34,8 +34,7 @@ class ExtendedRecipeMixin(serializers.ModelSerializer): except KeyError: api_serializer = None # extended values are computationally expensive and not needed in normal circumstances - # another choice is to only return the fields when self.__class__ = serializer and not worry about 'extended' - if self.context['request'] and bool(int(self.context['request'].query_params.get('extended', False))) and self.__class__ == api_serializer: + if self.context.get('request', False) and bool(int(self.context['request'].query_params.get('extended', False))) and self.__class__ == api_serializer: return fields else: del fields['image'] diff --git a/vue/src/apps/ChecklistView/ChecklistView.vue b/vue/src/apps/ChecklistView/ChecklistView.vue new file mode 100644 index 00000000..8990ce6e --- /dev/null +++ b/vue/src/apps/ChecklistView/ChecklistView.vue @@ -0,0 +1,255 @@ + + + + + + + diff --git a/vue/src/apps/ModelListView/ModelListView.vue b/vue/src/apps/ModelListView/ModelListView.vue index c8a6bec7..e73053af 100644 --- a/vue/src/apps/ModelListView/ModelListView.vue +++ b/vue/src/apps/ModelListView/ModelListView.vue @@ -64,7 +64,7 @@ import { BootstrapVue } from "bootstrap-vue" import "bootstrap-vue/dist/bootstrap-vue.css" -import { CardMixin, ApiMixin, getConfig, StandardToasts, getUserPreference, makeToast } from "@/utils/utils" +import { CardMixin, ApiMixin, getConfig, StandardToasts } from "@/utils/utils" import GenericInfiniteCards from "@/components/GenericInfiniteCards" import GenericHorizontalCard from "@/components/GenericHorizontalCard" diff --git a/vue/src/components/Ingredient.vue b/vue/src/components/Ingredient.vue new file mode 100644 index 00000000..a15c0ff7 --- /dev/null +++ b/vue/src/components/Ingredient.vue @@ -0,0 +1,236 @@ + + + + + diff --git a/vue/vue.config.js b/vue/vue.config.js index 90cdf729..25c539f4 100644 --- a/vue/vue.config.js +++ b/vue/vue.config.js @@ -91,9 +91,9 @@ module.exports = { }, // TODO make this conditional on .env DEBUG = FALSE config.optimization.minimize(false) - ) + ); - config.plugin("BundleTracker").use(BundleTracker, [{ relativePath: true, path: "../vue/" }]) + config.plugin('BundleTracker').use(BundleTracker, [{relativePath: true, path: '../vue/'}]); config.resolve.alias.set("__STATIC__", "static")