diff --git a/cookbook/serializer.py b/cookbook/serializer.py
index c43b52a7c..f2c41dfe0 100644
--- a/cookbook/serializer.py
+++ b/cookbook/serializer.py
@@ -687,20 +687,21 @@ class ShoppingListEntrySerializer(WritableNestedModelSerializer):
return fields
def run_validation(self, data):
- if (
- data.get('checked', False)
- and self.root.instance
- and not self.root.instance.checked
- ):
- # if checked flips from false to true set completed datetime
- data['completed_at'] = timezone.now()
- elif not data.get('checked', False):
- # if not checked set completed to None
- data['completed_at'] = None
- else:
- # otherwise don't write anything
- if 'completed_at' in data:
- del data['completed_at']
+ if self.root.instance.__class__.__name__ == 'ShoppingListEntry':
+ if (
+ data.get('checked', False)
+ and self.root.instance
+ and not self.root.instance.checked
+ ):
+ # if checked flips from false to true set completed datetime
+ data['completed_at'] = timezone.now()
+ elif not data.get('checked', False):
+ # if not checked set completed to None
+ data['completed_at'] = None
+ else:
+ # otherwise don't write anything
+ if 'completed_at' in data:
+ del data['completed_at']
return super().run_validation(data)
diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue
index 465e52f91..182c76c4e 100644
--- a/vue/src/apps/ShoppingListView/ShoppingListView.vue
+++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue
@@ -504,6 +504,14 @@
+
+ {{ $t("mark_complete") }}
+