From af0e0cffe85dd8908d33964054010bfc8a2e327a Mon Sep 17 00:00:00 2001 From: j Date: Wed, 15 Jun 2016 14:33:58 +0200 Subject: [PATCH] person can be removed again, let async itemsort fail without exception --- pandora/person/tasks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora/person/tasks.py b/pandora/person/tasks.py index 98095bd33..8d65ca644 100644 --- a/pandora/person/tasks.py +++ b/pandora/person/tasks.py @@ -7,8 +7,11 @@ import models @task(ignore_results=True, queue='default') def update_itemsort(id): - p = models.Person.objects.get(pk=id) - p.update_itemsort() + try: + p = models.Person.objects.get(pk=id) + p.update_itemsort() + except models.Person.DoesNotExist: + pass @task(ignore_results=True, queue='default') def update_file_paths(id):