Commits

Waldemar Kornewald committed 832d8db

fixed querying against empty list. now returns no results

  • Participants
  • Parent commits 354cf0f

Comments (0)

Files changed (1)

File db/compiler.py

     # This function is used by the default add_filters() implementation
     @safe_call
     def add_filter(self, column, lookup_type, negated, db_type, value):
+        if value in ([], ()):
+            self.pk_filters = []
+            return
+
         # Emulated/converted lookups
         if column == self.query.get_meta().pk.column:
             column = '__key__'