]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Apply code suggestions 3309/head
authorshamoon <4887959+shamoon@users.noreply.github.com>
Mon, 8 May 2023 22:33:54 +0000 (15:33 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Wed, 10 May 2023 02:48:19 +0000 (19:48 -0700)
Co-Authored-By: Trenton H <797416+stumpylog@users.noreply.github.com>
src/documents/index.py

index decef213153c84b3d01a725c9f0f6ea0275f5a2b..087329f9afce0b403d42a74b76be3f7fe8dff526 100644 (file)
@@ -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: