Issue: positional argument is ignored by `Model.filter()`
Author: Incanus3
State: closed
Created: 2020-11-07 11:01:59

Hi,
I've just run into this issue. This is the query building code:

```python
BillItem.filter(~DQ(id = orig_bill_item.id),
                subtable = orig_bill_item.subtable,
                product_ident = orig_bill_item.product_ident)
```

But when I run this, the first param is completely ignored. This can be easily seen when I run `.sql()` on it - this is what it returns:
```python
['SELECT "t1"."idriadok", "t1"."u_cis", "t1"."id_man", "t1"."blocked_by", "t1"."cena", "t1"."c_karty", "t1"."cidmaster", "t1"."stul", "t1"."kolik", "t1"."pc", "t1"."pr", "t1"."delitel" FROM "food600"."uc_pol" AS "t1" WHERE (("t1"."c_karty" = %s) AND ("t1"."stul" = %s))', [1, '1.1']]
```

When I use `BillItem.select().where()` with explicit expressions built by calling operators on the fields, everything works as expected. I also tried to use `BillItem.id != orig_bill_item.id` as the first param to `.filter()` (don't know if that's supposed to work), but it gets ignored as well.

This is a legacy db with terrible column names, here is the `Model` definition:
```python
class BillItem(BaseModel):
  class Meta:
    schema     = 'food600'
    table_name = 'uc_pol'

  id = AutoField(column_name = 'idriadok')

  note        = CharField(column_name = 'u_cis',      max_length = 7, default = '')
  id_man      = CharField(column_name = 'id_man',     max_length = 2, default = '')
  blocked_by  = CharField(column_name = 'blocked_by', max_length = 2, default = '')
  price_level = CharField(column_name = 'cena',       max_length = 1, default = '')

  product_ident       = IntegerField(column_name = 'c_karty')
  master_kas          = IntegerField(column_name = 'cidmaster', default = 0)
  subtable            = DecimalField(column_name = 'stul',      max_digits = 6,  decimal_places = 1)
  quantity            = DecimalField(column_name = 'kolik',     max_digits = 10, decimal_places = 3)
  unit_price_with_tax = DecimalField(column_name = 'pc',        max_digits = 12, decimal_places = 2)
  tax_rate            = DecimalField(column_name = 'pr',        max_digits = 5,  decimal_places = 3)
  divisor             = DecimalField(column_name = 'delitel',   max_digits = 1,  decimal_places = 0,
                                     default = 0)
```

I'm using peewee version 3.13.3 and python version 3.8.3. Please tell me if I should provide any more info. Also thank you for this amazing library, I simply love it.

Thanks, this is a bad regression. I've patched this and will make a new release early in the week.

Scratch that, never put off til tomorrow what you can do today, and all that.

I've tagged and released a new version 3.14, which contains this fix. Thanks again for the excellent bug report.

wow, that was fast. thanks for the great work, really appreciate it.

just tried this after the update and can confirm it works correctly. one question though - the `~DQ(id = orig_bill_item.id)` expression generates this sql fragment: `NOT ("t1"."idriadok" = %s)`. this makes sense of course, but my question is: is there a way to get `"t1".idiriadok" != %s` using django-style lookups?

You can do `id__ne=orig_bill_item.id`.

Oh, cool, thanks. Maybe I missed something, but I couldn't find any documentation for these, so I supposed the lookups will match the ones documented [here](https://docs.djangoproject.com/en/3.1/ref/models/querysets/#field-lookups) and there's no `__ne`.