Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Formatting

Roland Geider162438f37af4
diff --git a/wger/exercises/api/views.py b/wger/exercises/api/views.py
index d4db8efd3..67e44c082 100644
--- a/wger/exercises/api/views.py
+++ b/wger/exercises/api/views.py
@@ -95,14 +95,22 @@ class ExerciseBaseViewSet(CreateUpdateModelViewSet):
Save entry to activity stream
"""
super().perform_create(serializer)
- actstream_action.send(self.request.user, verb='created', action_object=serializer.instance)
+ actstream_action.send(
+ self.request.user,
+ verb=HistoryModes.CREATED.value,
+ action_object=serializer.instance
+ )
def perform_update(self, serializer):
"""
Save entry to activity stream
"""
super().perform_create(serializer)
- actstream_action.send(self.request.user, verb='updated', action_object=serializer.instance)
+ actstream_action.send(
+ self.request.user,
+ verb=HistoryModes.UPDATED.value,
+ action_object=serializer.instance
+ )
class ExerciseTranslationViewSet(CreateUpdateModelViewSet):