Enhancement: allow webUI first account signup (#9500)

This commit is contained in:
shamoon
2025-03-29 10:12:34 -07:00
committed by GitHub
parent b4b2a92225
commit 32a7f9cd5a
16 changed files with 163 additions and 120 deletions

View File

@@ -1,5 +1,7 @@
from django.conf import settings as django_settings
from django.contrib.auth.models import User
from documents.models import Document
from paperless.config import GeneralConfig
@@ -25,4 +27,9 @@ def settings(request):
"domain": getattr(django_settings, "PAPERLESS_URL", request.get_host()),
"APP_TITLE": app_title,
"APP_LOGO": app_logo,
"FIRST_INSTALL": User.objects.exclude(
username__in=["consumer", "AnonymousUser"],
).count()
== 0
and Document.global_objects.count() == 0,
}