📝🩹 More inline docs;

This commit is contained in:
Brian Wiborg 2025-10-01 22:00:27 +02:00
parent 00e18af8fd
commit 3de9352227
No known key found for this signature in database

View file

@ -127,7 +127,9 @@ class Project:
# Get a fresh copy of the config (without aerich.models anywhere) # Get a fresh copy of the config (without aerich.models anywhere)
tortoise_cfg = self.build_tortoise_config(db_url=db_url) tortoise_cfg = self.build_tortoise_config(db_url=db_url)
# Prevent leaking other app's models to Aerich.
tortoise_cfg["apps"] = {app_label: tortoise_cfg["apps"][app_label]} tortoise_cfg["apps"] = {app_label: tortoise_cfg["apps"][app_label]}
# Append aerich.models to the models list of the target app only # Append aerich.models to the models list of the target app only
tortoise_cfg["apps"][app_label]["models"].append("aerich.models") tortoise_cfg["apps"][app_label]["models"].append("aerich.models")