mirror of
https://github.com/goauthentik/authentik.git
synced 2026-08-30 18:51:39 -07:00
* packages/django-postgres-cache: fix naive datetime warning when timeout=None with USE_TZ=True
The _base_set_expiry method in DatabaseCache returned datetime.max (a
timezone-naive value) when timeout=None, while the project runs with
USE_TZ=True.
This caused Django to emit a RuntimeWarning on every cache write that
passes timeout=None:
DateTimeField CacheEntry.expires received a naive datetime (...)
while time zone support is active.
* fix linting
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
django-postgres-cache
Use in migrations
Migrations that use the cache with this installed need to depend on the migration to create the cache entry table:
dependencies = [
# ...other requirements
("django_postgres_cache", "0001_initial"),
]