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