We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c26a2f4 + 387e3be commit d52ba1bCopy full SHA for d52ba1b
1 file changed
django_ai_assistant/apps.py
@@ -17,5 +17,10 @@ def ready(self):
17
import_module(f"{app.name}.ai_assistants")
18
except ModuleNotFoundError:
19
# If the module exists but there is an error in it, we want to raise the error:
20
- if importlib.util.find_spec(f"{app.name}.ai_assistants"):
21
- raise
+ try:
+ # This raises on single-module app, e.g. django-health-check v4.0+:
22
+ # health_check.contrib.celery.
23
+ if importlib.util.find_spec(f"{app.name}.ai_assistants"):
24
+ raise
25
+ except ModuleNotFoundError:
26
+ pass
0 commit comments