Implement exchange imports and frontend reporting APIs
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m50s
CI/CD Pipeline / Run Tests (push) Successful in 3m57s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m50s
CI/CD Pipeline / Run Tests (push) Successful in 3m57s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""Admin configuration for user app."""
|
||||
|
||||
from apps.core.models import BackgroundJob
|
||||
from apps.user.models import Profile, User
|
||||
from contextlib import suppress
|
||||
|
||||
from django.contrib import admin
|
||||
from django.contrib.admin.sites import NotRegistered
|
||||
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
||||
@@ -9,6 +9,9 @@ from django.contrib.auth.models import Group
|
||||
from django.utils.html import format_html
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from apps.core.models import BackgroundJob
|
||||
from apps.user.models import Profile, User
|
||||
|
||||
try:
|
||||
from django_celery_beat.models import (
|
||||
ClockedSchedule,
|
||||
@@ -38,10 +41,8 @@ def _unregister(model) -> None:
|
||||
if model is None:
|
||||
return
|
||||
|
||||
try:
|
||||
with suppress(NotRegistered):
|
||||
admin.site.unregister(model)
|
||||
except NotRegistered:
|
||||
pass
|
||||
|
||||
|
||||
_unregister(User)
|
||||
|
||||
Reference in New Issue
Block a user