diff --git a/backoffice/backoffice/users/tasks.py b/backoffice/backoffice/users/tasks.py index 29486c79..c99341c5 100644 --- a/backoffice/backoffice/users/tasks.py +++ b/backoffice/backoffice/users/tasks.py @@ -1,6 +1,7 @@ -from config import celery_app from django.contrib.auth import get_user_model +from config import celery_app + User = get_user_model() diff --git a/backoffice/config/settings/local.py b/backoffice/config/settings/local.py index 7141c1b8..3f93cf21 100644 --- a/backoffice/config/settings/local.py +++ b/backoffice/config/settings/local.py @@ -82,6 +82,6 @@ "client_id": env("ORCID_CLIENT_ID", default=""), "secret": env("ORCID_CLIENT_SECRET", default=""), }, - "BASE_DOMAIN": "sandbox.orcid.org" + "BASE_DOMAIN": "sandbox.orcid.org", } } diff --git a/backoffice/config/urls.py b/backoffice/config/urls.py index fdb5ee4f..2b838d49 100644 --- a/backoffice/config/urls.py +++ b/backoffice/config/urls.py @@ -5,12 +5,11 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import include, path from django.views import defaults as default_views +from django.views.decorators.csrf import csrf_exempt from django.views.generic import TemplateView from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView from rest_framework.authtoken.views import obtain_auth_token from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView -from django.views.decorators.csrf import csrf_exempt - urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), diff --git a/workflows/tests/test_author_create_tasks.py b/workflows/tests/test_author_create_tasks.py index 1958145a..1a38911b 100644 --- a/workflows/tests/test_author_create_tasks.py +++ b/workflows/tests/test_author_create_tasks.py @@ -1,4 +1,5 @@ import pytest + from dags.author.author_create.shared_tasks import ( close_author_create_user_ticket, )