mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-10-26 17:08:58 +03:00
Support for Django 4 (#101)
* Support for Django 4 * Change pytest-django version * Change psycopg2 version * Change pytest version * Change tox version * Change pytest-cov version * Update circle ci jobs * Fix ci jobs * Update ci to postgres 12 * Allow Django 5.0 * Bump Django min version to 3.2 * Fix CI to account for >= 3.2 requirement * Fix quote * Remove python 3.12 for now due to distutils removal * Remove Django upper bound * Add back python3.6,3.7 wfs * Downgrade dj-database-url * Fix isnull issue from Django 4
This commit is contained in:
@@ -43,6 +43,10 @@ class LocalizedLookupMixin:
|
||||
return super().process_lhs(qn, connection)
|
||||
|
||||
def get_prep_lookup(self):
|
||||
# Django 4.0 removed the ability for isnull fields to be something other than a bool
|
||||
# We should NOT convert them to strings
|
||||
if isinstance(self.rhs, bool):
|
||||
return self.rhs
|
||||
return str(self.rhs)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user