Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Don't allow to import null weight entries

Roland Geider9e2bdb7f5b7d
diff --git a/wger/software/templates/changelog.html b/wger/software/templates/changelog.html
index 863ce6c62..d3de79bc6 100644
--- a/wger/software/templates/changelog.html
+++ b/wger/software/templates/changelog.html
@@ -32,6 +32,7 @@
<a href="https://github.com/wger-project/wger/issues/279">#279</a>
<a href="https://github.com/wger-project/wger/issues/275">#275</a>
<a href="https://github.com/wger-project/wger/issues/270">#270</a>
+ <a href="https://github.com/wger-project/wger/issues/269">#269</a>
<a href="https://github.com/wger-project/wger/issues/258">#258</a>
<a href="https://github.com/wger-project/wger/issues/257">#257</a>
</li>
diff --git a/wger/weight/helpers.py b/wger/weight/helpers.py
index e26787f21..b691eba99 100644
--- a/wger/weight/helpers.py
+++ b/wger/weight/helpers.py
@@ -63,7 +63,7 @@ def parse_weight_csv(request, cleaned_data):
# there is no existing weight entry in the database for that date
unique_in_db = not duplicate_date_in_db
- if unique_among_csv and unique_in_db:
+ if unique_among_csv and unique_in_db and parsed_weight:
distinct_weight_entries.append((parsed_date, parsed_weight))
entry_dates.add(parsed_date)
else: