Update src/paperless_mail/mail.py with code suggestions

Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
This commit is contained in:
shamoon 2023-04-25 07:22:16 -07:00 committed by GitHub
parent 434d1fe225
commit 0557a15fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,7 +381,7 @@ def make_criterias(rule):
rule_query = get_rule_action(rule).get_criteria()
if isinstance(rule_query, dict):
if len(rule_query) != 0 or len(criterias) != 0:
if len(rule_query) or len(criterias):
return AND(**rule_query, **criterias)
else:
return AND(rule_query, **criterias)