From 110c57d726b3a0500a2ef4e82df9f41e4025d5a3 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 4 Aug 2017 18:11:51 +0200 Subject: [PATCH] session can be gone --- pandora/user/tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/user/tasks.py b/pandora/user/tasks.py index d782d5fad..304828649 100644 --- a/pandora/user/tasks.py +++ b/pandora/user/tasks.py @@ -36,7 +36,10 @@ def update_statistics(): @task(ignore_results=True, queue='default') def parse_data(key): from . import models - session_data = models.SessionData.objects.get(session_key=key) + try: + session_data = models.SessionData.objects.get(session_key=key) + except models.SessionData.DoesNotExist: + return session_data.parse_data() session_data.save()