AttributeError: 'bool' object has no attribute 'safe_name' after upgrade 3.10 -> 3.11
Wow, thanks! So impressed by the quality of your work in general. Thank you for what you do! Pushed 3.11.1 as this seemed like a potentially disruptive regression. Thx for reporting.
I updated to peewee to `3.11.0` from `3.10.0` 4 days ago and it presented with the following error. I cannot right now get more detail, because I don't have the time. But I will provide a minimal program reproducing the bug tomorrow. This is just meant as a placeholder, and maybe it'll already point you into the right direction. For now, I downgraded peewee to `3.10.0` and all is well again.

<details><summary>traceback</summary>

<pre>
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/[...]/app/api.py", line 97, in people
    & (EasyContacts.type_id == ContactType.PERSON)
  File "/home/[...]/app/api.py", line 88, in <listcomp>
    c.referenced_to
  File "/usr/lib/python3.7/site-packages/peewee.py", line 4221, in next
    self.cursor_wrapper.iterate()
  File "/usr/lib/python3.7/site-packages/peewee.py", line 4140, in iterate
    result = self.process_row(row)
  File "/usr/lib/python3.7/site-packages/peewee.py", line 7364, in process_row
    if instance not in set_keys and dest not in set_keys \
  File "/usr/lib/python3.7/site-packages/peewee.py", line 6403, in __hash__
    return hash((self.__class__, self._pk))
  File "/usr/lib/python3.7/site-packages/peewee.py", line 6294, in get_id
    return getattr(self, self._meta.primary_key.safe_name)
AttributeError: 'bool' object has no attribute 'safe_name'
</pre>
</details>