📝🩹 More inline docs;
This commit is contained in:
parent
00e18af8fd
commit
3de9352227
1 changed files with 2 additions and 0 deletions
|
|
@ -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")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue