Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix nagging warning

Roland Geider522db6c9d10b
diff --git a/wger/measurements/api/serializers.py b/wger/measurements/api/serializers.py
index 083c0d686..7c975f452 100644
--- a/wger/measurements/api/serializers.py
+++ b/wger/measurements/api/serializers.py
@@ -1,3 +1,21 @@
+# This file is part of wger Workout Manager.
+#
+# wger Workout Manager is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# wger Workout Manager is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.
+
+# Standard Library
+from decimal import Decimal
+
# Third Party
from rest_framework import serializers
@@ -27,8 +45,8 @@ class MeasurementSerializer(serializers.ModelSerializer):
value = serializers.DecimalField(
max_digits=6,
decimal_places=2,
- min_value=0,
- max_value=5000,
+ min_value=Decimal(0),
+ max_value=Decimal(5000),
coerce_to_string=False,
)