From 44a6e0c69a0e8ce0c5362f0e7ce4187388819850 Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 11 Feb 2025 23:08:02 -0500 Subject: [PATCH] Replace `Source.SOURCE_TYPES` --- tubesync/sync/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tubesync/sync/views.py b/tubesync/sync/views.py index 24ff6866..319f1bf8 100644 --- a/tubesync/sync/views.py +++ b/tubesync/sync/views.py @@ -31,6 +31,7 @@ from .utils import validate_url, delete_file from .tasks import (map_task_to_instance, get_error_message, get_source_completed_tasks, get_media_download_task, delete_task_by_media, index_source_task) +from .choices import YouTube_SourceType from . import signals from . import youtube @@ -391,7 +392,7 @@ class AddSourceView(EditSourceMixin, CreateView): def dispatch(self, request, *args, **kwargs): source_type = request.GET.get('source_type', '') - if source_type and source_type in Source.SOURCE_TYPES: + if source_type and source_type in YouTube_SourceType.values: self.prepopulated_data['source_type'] = source_type key = request.GET.get('key', '') if key: