Import and set the variable

This commit is contained in:
tcely 2025-04-17 02:53:46 -04:00 committed by GitHub
parent d60a159af7
commit 09969afa6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,11 +16,11 @@ from pathlib import Path
from datetime import datetime, timedelta from datetime import datetime, timedelta
from shutil import copyfile, rmtree from shutil import copyfile, rmtree
from PIL import Image from PIL import Image
from django import db
from django.conf import settings from django.conf import settings
from django.core.files.base import ContentFile from django.core.files.base import ContentFile
from django.core.files.uploadedfile import SimpleUploadedFile from django.core.files.uploadedfile import SimpleUploadedFile
from django.db import reset_queries, DatabaseError, IntegrityError from django.db import reset_queries, DatabaseError, IntegrityError
from django.db.connection import vendor as db_vendor
from django.db.transaction import atomic from django.db.transaction import atomic
from django.utils import timezone from django.utils import timezone
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -38,6 +38,8 @@ from .utils import ( get_remote_image, resize_image_to_height, delete_file,
write_text_file, filter_response, ) write_text_file, filter_response, )
from .youtube import YouTubeError from .youtube import YouTubeError
db_vendor = db.connection.vendor
def get_hash(task_name, pk): def get_hash(task_name, pk):
''' '''