mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-10 15:36:19 +01:00
Enhancement: allow webUI first account signup (#9500)
This commit is contained in:
parent
b4b2a92225
commit
32a7f9cd5a
16 changed files with 163 additions and 120 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue