Skip to content

Commit 583a247

Browse files
committed
fix(models): connect normalization signals
1 parent a493d12 commit 583a247

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

db_adapter/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from django.db.models import Model
2+
from django.db.models.signals import class_prepared, pre_init
23

34
from .utils import normalize_table
45

@@ -19,3 +20,7 @@ def apply_db_table_normalization(sender: Model, **kwargs):
1920
)
2021

2122
sender._meta.db_table = normalized_name
23+
24+
25+
pre_init.connect(apply_db_table_normalization)
26+
class_prepared.connect(apply_db_table_normalization)

0 commit comments

Comments
 (0)