File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 20
20
RequestVersioningMiddleware ,
21
21
TrustedHostMiddleware ,
22
22
)
23
- from ellar .core .modules import DynamicModule , ModuleBase , ModuleSetup , ModuleTemplateRef
23
+ from ellar .core .modules import (
24
+ DynamicModule ,
25
+ ModuleBase ,
26
+ ModuleRefBase ,
27
+ ModuleSetup ,
28
+ ModuleTemplateRef ,
29
+ )
24
30
from ellar .core .routing import ApplicationRouter
25
31
from ellar .core .templating import AppTemplating , Environment
26
32
from ellar .core .versioning import VERSIONING , BaseAPIVersioning
@@ -142,13 +148,11 @@ def install_module(
142
148
if module_ref :
143
149
return module_ref .get_module_instance ()
144
150
145
- module_ref = module_config .get_module_ref ( # type: ignore
151
+ module_ref = module_config .get_module_ref ( # type: ignore[assignment]
146
152
config = self .config ,
147
153
container = self .injector .container ,
148
154
)
149
- if not module_ref :
150
- raise Exception (f"Invalid Module Configuration for { module_config .module } " )
151
-
155
+ assert isinstance (module_ref , ModuleRefBase )
152
156
self .injector .add_module (module_ref )
153
157
154
158
module_ref .run_module_register_services ()
You can’t perform that action at this time.
0 commit comments