Avoid ImportError

This commit is contained in:
tcely authored and GitHub committed 2025-02-10 04:50:08 -05:00
1 parent 332f34c78e
commit b16fb062aa
1 file changed
+3 -3
+3 -3
View File
@@ -15,9 +15,6 @@ postprocessor_hook = {
class BaseStatus: class BaseStatus:
from .models import Media
from .tasks import get_media_download_task
status_dict = dict() status_dict = dict()
valid = set() valid = set()
@@ -52,6 +49,9 @@ class BaseStatus:
def update_task(self): def update_task(self):
if self.media_key is None: if self.media_key is None:
return return
from .models import Media
from .tasks import get_media_download_task
media = Media.objects.get(key=self.media_key) media = Media.objects.get(key=self.media_key)
task = get_media_download_task(str(media.pk)) task = get_media_download_task(str(media.pk))
if task: if task: