Check the if condition before importing anything

This commit is contained in:
tcely authored and GitHub committed 2025-07-29 01:48:22 -04:00
1 parent e68d21b457
commit 2910fe8638
1 file changed
+7 -7
+7 -7
View File
@@ -404,13 +404,13 @@ def historical_task(signal_name, task_obj, exception_obj=None, /, *, huey=None):
scheduled_at = huey.scheduled_at_from_task(task_obj)
if scheduled_at:
th.scheduled_at = scheduled_at
try:
from django.core.exceptions import ValidationError
from sync.models import Media, Source
except:
pass
else:
if not th.verbose_name:
if not th.verbose_name:
try:
from django.core.exceptions import ValidationError
from sync.models import Media, Source
except:
pass
else:
try:
key = task_obj.args[0]
instance_uuid_str = str(key)