mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Fix: disable email workflow type if email not enabled
This commit is contained in:
@@ -23,6 +23,7 @@ class TestApiUiSettings(DirectoriesMixin, APITestCase):
|
||||
def test_api_get_ui_settings(self):
|
||||
response = self.client.get(self.ENDPOINT, format="json")
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.maxDiff = None
|
||||
self.assertDictEqual(
|
||||
response.data["user"],
|
||||
{
|
||||
@@ -45,6 +46,7 @@ class TestApiUiSettings(DirectoriesMixin, APITestCase):
|
||||
"update_checking": {
|
||||
"backend_setting": "default",
|
||||
},
|
||||
"email_enabled": False,
|
||||
},
|
||||
)
|
||||
|
||||
|
@@ -1714,6 +1714,8 @@ class UiSettingsView(GenericAPIView):
|
||||
manager.get_outlook_authorization_url()
|
||||
)
|
||||
|
||||
ui_settings["email_enabled"] = settings.EMAIL_ENABLED
|
||||
|
||||
user_resp = {
|
||||
"id": user.id,
|
||||
"username": user.username,
|
||||
|
Reference in New Issue
Block a user