Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Check for string 'None' as it is sometimes passed in the URL, very ugly

Roland Geiderfdd48bae13e9
diff --git a/weight/views.py b/weight/views.py
index 0e4027d7d..973619c25 100644
--- a/weight/views.py
+++ b/weight/views.py
@@ -46,7 +46,7 @@ def add(request, id=None):
template_data['active_tab'] = 'weight'
# Load weight
- if id:
+ if id and id != 'None':
weight = get_object_or_404(WeightEntry, pk=id, user=request.user)
else:
weight = WeightEntry()