mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-06 23:05:42 +01:00
Solving issue with search criteria maximum age for some mail server
Some mail servers (mail.ru) do not support search criteria for the maximum age. By setting the maximum age to 0, it is possible to hide the search criteria. This PR solves that problem.
This commit is contained in:
parent
bd8e68692e
commit
4cd772a39e
1 changed files with 3 additions and 3 deletions
|
|
@ -75,9 +75,9 @@ def get_rule_action(rule):
|
|||
|
||||
def make_criterias(rule):
|
||||
maximum_age = date.today() - timedelta(days=rule.maximum_age)
|
||||
criterias = {
|
||||
"date_gte": maximum_age
|
||||
}
|
||||
criterias = {}
|
||||
if rule.maximum_age > 0:
|
||||
criterias["date_gte"] = maximum_age
|
||||
if rule.filter_from:
|
||||
criterias["from_"] = rule.filter_from
|
||||
if rule.filter_subject:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue