mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge pull request #1068 from servusoft/dev
Solving issue with search criteria 'maximum age' for some mail server
This commit is contained in:
commit
fcc4ecd007
@ -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…
x
Reference in New Issue
Block a user