mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-18 17:34:39 -05:00
Compare commits
No commits in common. "b34538d991bab36c1f590b2fe47f40c40f07ffd5" and "bfeaa1b1193080c4a3da9959213042f262740d23" have entirely different histories.
b34538d991
...
bfeaa1b119
55
.github/DISCUSSION_TEMPLATE/support.yml
vendored
55
.github/DISCUSSION_TEMPLATE/support.yml
vendored
@ -1,55 +0,0 @@
|
|||||||
title: "[Support] "
|
|
||||||
body:
|
|
||||||
- type: textarea
|
|
||||||
id: description
|
|
||||||
attributes:
|
|
||||||
label: What's your question or issue?
|
|
||||||
description: Provide a clear and concise description of what you're trying to do, and what's going wrong.
|
|
||||||
placeholder: |
|
|
||||||
I'm trying to...
|
|
||||||
|
|
||||||
[Include screenshots if helpful]
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: steps
|
|
||||||
attributes:
|
|
||||||
label: What have you tried?
|
|
||||||
description: Describe any steps you've already taken to troubleshoot or solve the issue.
|
|
||||||
placeholder: |
|
|
||||||
- I checked the logs and saw...
|
|
||||||
- I followed the install guide and tried...
|
|
||||||
- type: input
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: Paperless-ngx version
|
|
||||||
placeholder: e.g. 1.14.0
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
id: host-os
|
|
||||||
attributes:
|
|
||||||
label: Host OS
|
|
||||||
description: Include architecture if relevant.
|
|
||||||
placeholder: e.g. Ubuntu 22.04 / Raspberry Pi arm64
|
|
||||||
- type: dropdown
|
|
||||||
id: install-method
|
|
||||||
attributes:
|
|
||||||
label: Installation method
|
|
||||||
options:
|
|
||||||
- Docker - official image
|
|
||||||
- Docker - linuxserver.io image
|
|
||||||
- Bare metal
|
|
||||||
- Other (please describe above)
|
|
||||||
- type: textarea
|
|
||||||
id: system-status
|
|
||||||
attributes:
|
|
||||||
label: System status
|
|
||||||
description: If available, copy & paste the system status output from Settings > System Status > Copy
|
|
||||||
render: json
|
|
||||||
- type: textarea
|
|
||||||
id: logs
|
|
||||||
attributes:
|
|
||||||
label: Relevant logs or output
|
|
||||||
description: If you have logs, errors that might help, paste it here.
|
|
||||||
render: bash
|
|
@ -6007,6 +6007,7 @@ primarily.
|
|||||||
a very good job at ocr'ing a document with the default
|
a very good job at ocr'ing a document with the default
|
||||||
language. Certain language specifics such as umlauts may not get
|
language. Certain language specifics such as umlauts may not get
|
||||||
picked up properly.
|
picked up properly.
|
||||||
|
- `PAPERLESS_DEBUG` defaults to `false`.
|
||||||
- The presence of `PAPERLESS_DBHOST` now determines whether to use
|
- The presence of `PAPERLESS_DBHOST` now determines whether to use
|
||||||
PostgreSQL or SQLite.
|
PostgreSQL or SQLite.
|
||||||
- `PAPERLESS_OCR_THREADS` is gone and replaced with
|
- `PAPERLESS_OCR_THREADS` is gone and replaced with
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Have a look at the docs for documentation.
|
# Have a look at the docs for documentation.
|
||||||
# https://docs.paperless-ngx.com/configuration/
|
# https://docs.paperless-ngx.com/configuration/
|
||||||
|
|
||||||
|
# Debug. Only enable this for development.
|
||||||
|
|
||||||
|
#PAPERLESS_DEBUG=false
|
||||||
|
|
||||||
# Required services
|
# Required services
|
||||||
|
|
||||||
#PAPERLESS_REDIS=redis://localhost:6379
|
#PAPERLESS_REDIS=redis://localhost:6379
|
||||||
|
@ -125,8 +125,3 @@ class MailRuleSerializer(OwnedObjectSerializer):
|
|||||||
raise serializers.ValidationError("An action parameter is required.")
|
raise serializers.ValidationError("An action parameter is required.")
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
def validate_maximum_age(self, value):
|
|
||||||
if value > 36500: # ~100 years
|
|
||||||
raise serializers.ValidationError("Maximum mail age is unreasonably large.")
|
|
||||||
return value
|
|
||||||
|
@ -680,44 +680,3 @@ class TestAPIMailRules(DirectoriesMixin, APITestCase):
|
|||||||
self.assertEqual(response.data["results"][0]["name"], rule1.name)
|
self.assertEqual(response.data["results"][0]["name"], rule1.name)
|
||||||
self.assertEqual(response.data["results"][1]["name"], rule2.name)
|
self.assertEqual(response.data["results"][1]["name"], rule2.name)
|
||||||
self.assertEqual(response.data["results"][2]["name"], rule4.name)
|
self.assertEqual(response.data["results"][2]["name"], rule4.name)
|
||||||
|
|
||||||
def test_mailrule_maxage_validation(self):
|
|
||||||
"""
|
|
||||||
GIVEN:
|
|
||||||
- An existing mail account
|
|
||||||
WHEN:
|
|
||||||
- The user submits a mail rule with an excessively large maximum_age
|
|
||||||
THEN:
|
|
||||||
- The API should reject the request
|
|
||||||
"""
|
|
||||||
account = MailAccount.objects.create(
|
|
||||||
name="Email1",
|
|
||||||
username="username1",
|
|
||||||
password="password1",
|
|
||||||
imap_server="server.example.com",
|
|
||||||
imap_port=443,
|
|
||||||
imap_security=MailAccount.ImapSecurity.SSL,
|
|
||||||
character_set="UTF-8",
|
|
||||||
)
|
|
||||||
|
|
||||||
rule_data = {
|
|
||||||
"name": "Rule1",
|
|
||||||
"account": account.pk,
|
|
||||||
"folder": "INBOX",
|
|
||||||
"filter_from": "from@example.com",
|
|
||||||
"filter_to": "aperson@aplace.com",
|
|
||||||
"filter_subject": "subject",
|
|
||||||
"filter_body": "body",
|
|
||||||
"filter_attachment_filename_include": "file.pdf",
|
|
||||||
"maximum_age": 9000000,
|
|
||||||
"action": MailRule.MailAction.MARK_READ,
|
|
||||||
"assign_title_from": MailRule.TitleSource.FROM_SUBJECT,
|
|
||||||
"assign_correspondent_from": MailRule.CorrespondentSource.FROM_NOTHING,
|
|
||||||
"order": 0,
|
|
||||||
"attachment_type": MailRule.AttachmentProcessing.ATTACHMENTS_ONLY,
|
|
||||||
}
|
|
||||||
|
|
||||||
response = self.client.post(self.ENDPOINT, data=rule_data, format="json")
|
|
||||||
|
|
||||||
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
|
|
||||||
self.assertIn("maximum_age", response.data)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user