mirror of
https://github.com/goauthentik/authentik.git
synced 2026-08-30 18:51:39 -07:00
events: log deprecation event for non-UTF8 database encoding
This commit is contained in:
@@ -59,3 +59,13 @@ class AuthentikEventsConfig(ManagedAppConfig):
|
||||
replacement_env=replace_env,
|
||||
message=msg,
|
||||
).save()
|
||||
|
||||
@ManagedAppConfig.reconcile_global
|
||||
def check_db_encoding(self):
|
||||
"""Check for deprecated database encoding"""
|
||||
from django.db import connection
|
||||
|
||||
from authentik.events.models import Event
|
||||
|
||||
for message in connection.validation.check():
|
||||
Event.log_deprecation("authentik.db.encoding", message.msg)
|
||||
|
||||
Reference in New Issue
Block a user