kadirpekel/liquer — pull request #1 by imiric (2013-11-19 21:42:34+00:00)
Title: Fix for empty Q objects

In Django, it is common to end up with empty Q objects when you're building the final Q object. For example:

```python
q = Q()
for arg in args:
if some_condition(arg):
q |= Q(arg_name=arg)
```

The Django ORM discards those when applying the filter.

Without this fix, I would get the following exception:

```
File "/home/imiric/liquer/liquer.py", line 106, in __call__
return self._test(obj)
File "/home/imiric/liquer/liquer.py", line 130, in _test
return reduce(self.op, [query(obj) for query in self.queries])
TypeError: reduce() of empty sequence with no initial value
```

Not sure if this is the most elegant way of solving this, so let me know.