From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 8 May 2023 22:33:54 +0000 (-0700) Subject: Apply code suggestions X-Git-Tag: v1.14.5~1^2~12^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3309%2Fhead;p=thirdparty%2Fpaperless-ngx.git Apply code suggestions Co-Authored-By: Trenton H <797416+stumpylog@users.noreply.github.com> --- diff --git a/src/documents/index.py b/src/documents/index.py index decef21315..087329f9af 100644 --- a/src/documents/index.py +++ b/src/documents/index.py @@ -269,10 +269,7 @@ class DelayedQuery: return query.Or(user_criterias) if len(user_criterias) > 0 else None def evalBoolean(self, val): - if val == "false" or val == "0": - return False - if val == "true" or val == "1": - return True + return val.lower() in {"true", "1"} def _get_query_sortedby(self): if "ordering" not in self.query_params: