Merge branch 'dev' into feature-ai

This commit is contained in:
shamoon
2025-09-30 11:09:24 -07:00
95 changed files with 5000 additions and 2131 deletions

View File

@@ -347,6 +347,7 @@ INSTALLED_APPS = [
"allauth.mfa",
"drf_spectacular",
"drf_spectacular_sidecar",
"treenode",
*env_apps,
]
@@ -954,7 +955,7 @@ CELERY_ACCEPT_CONTENT = ["application/json", "application/x-python-serialize"]
CELERY_BEAT_SCHEDULE = _parse_beat_schedule()
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#beat-schedule-filename
CELERY_BEAT_SCHEDULE_FILENAME = DATA_DIR / "celerybeat-schedule.db"
CELERY_BEAT_SCHEDULE_FILENAME = str(DATA_DIR / "celerybeat-schedule.db")
# Cachalot: Database read cache.

View File

@@ -21,7 +21,7 @@ TEST_CHANNEL_LAYERS = {
class TestWebSockets(TestCase):
async def test_no_auth(self):
communicator = WebsocketCommunicator(application, "/ws/status/")
connected, subprotocol = await communicator.connect()
connected, _ = await communicator.connect()
self.assertFalse(connected)
await communicator.disconnect()
@@ -31,7 +31,7 @@ class TestWebSockets(TestCase):
_authenticated.return_value = True
communicator = WebsocketCommunicator(application, "/ws/status/")
connected, subprotocol = await communicator.connect()
connected, _ = await communicator.connect()
self.assertTrue(connected)
message = {"type": "status_update", "data": {"task_id": "test"}}
@@ -63,7 +63,7 @@ class TestWebSockets(TestCase):
_authenticated.return_value = True
communicator = WebsocketCommunicator(application, "/ws/status/")
connected, subprotocol = await communicator.connect()
connected, _ = await communicator.connect()
self.assertTrue(connected)
await communicator.disconnect()
@@ -73,7 +73,7 @@ class TestWebSockets(TestCase):
_authenticated.return_value = True
communicator = WebsocketCommunicator(application, "/ws/status/")
connected, subprotocol = await communicator.connect()
connected, _ = await communicator.connect()
self.assertTrue(connected)
message = {"type": "status_update", "data": {"task_id": "test"}}
@@ -98,7 +98,7 @@ class TestWebSockets(TestCase):
communicator.scope["user"].is_superuser = False
communicator.scope["user"].id = 1
connected, subprotocol = await communicator.connect()
connected, _ = await communicator.connect()
self.assertTrue(connected)
# Test as owner
@@ -141,7 +141,7 @@ class TestWebSockets(TestCase):
_authenticated.return_value = True
communicator = WebsocketCommunicator(application, "/ws/status/")
connected, subprotocol = await communicator.connect()
connected, _ = await communicator.connect()
self.assertTrue(connected)
message = {"type": "documents_deleted", "data": {"documents": [1, 2, 3]}}

View File

@@ -58,6 +58,7 @@ from paperless.views import UserViewSet
from paperless_mail.views import MailAccountViewSet
from paperless_mail.views import MailRuleViewSet
from paperless_mail.views import OauthCallbackView
from paperless_mail.views import ProcessedMailViewSet
api_router = DefaultRouter()
api_router.register(r"correspondents", CorrespondentViewSet)
@@ -78,6 +79,7 @@ api_router.register(r"workflow_actions", WorkflowActionViewSet)
api_router.register(r"workflows", WorkflowViewSet)
api_router.register(r"custom_fields", CustomFieldViewSet)
api_router.register(r"config", ApplicationConfigurationViewSet)
api_router.register(r"processed_mail", ProcessedMailViewSet)
urlpatterns = [