diff options
-rw-r--r-- | app/daily/retriever.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/daily/retriever.py b/app/daily/retriever.py index 86a6fd9..d2e5464 100644 --- a/app/daily/retriever.py +++ b/app/daily/retriever.py @@ -41,8 +41,7 @@ def get_yesterday_weather(): hail=int(data['hail']), thunder=int(data['thunder']), ) - if created: - d = Daily.objects.get(date=dt) - d.weather = w - d.weather_human = render_to_string('human_weather.txt', {'object': w}).strip() - d.save() + d = Daily.objects.get(date=dt) + d.weather = w + d.weather_human = render_to_string('human_weather.txt', {'object': w}).strip() + d.save() |