🩹 This app's models only
This commit is contained in:
parent
37d807eb65
commit
63a4f4f948
1 changed files with 3 additions and 1 deletions
|
|
@ -257,6 +257,8 @@ class App:
|
||||||
and issubclass(value, Model)
|
and issubclass(value, Model)
|
||||||
and not name == Model.__name__
|
and not name == Model.__name__
|
||||||
):
|
):
|
||||||
|
value.__module__ = value.__module__.replace("ohmyapi.builtin.", "ohmyapi_")
|
||||||
|
if value.__module__.startswith(mod_name):
|
||||||
self._models[mod_name] = self._models.get(mod_name, []) + [value]
|
self._models[mod_name] = self._models.get(mod_name, []) + [value]
|
||||||
|
|
||||||
# if it's a package, recurse into submodules
|
# if it's a package, recurse into submodules
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue