From b18a6ab3cae6ca7cc3b839c131dbd00f1097b5e7 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 May 2020 15:15:26 +0200 Subject: [PATCH] stream might have been removed --- pandora/archive/models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 75d25de78..e9bd62a88 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -814,8 +814,12 @@ class Stream(models.Model): # file could have been moved while encoding # get current version from db and update - self.refresh_from_db() - self.update_status(ok, error) + try: + self.refresh_from_db() + except archive.models.DoesNotExist: + pass + else: + self.update_status(ok, error) def get_index(self): index = 1