Compare commits
3 Commits
9f729bda6c
...
7796f45097
Author | SHA1 | Date |
---|---|---|
|
7796f45097 | |
|
8a656c3c89 | |
|
8a5380d888 |
|
@ -6,7 +6,7 @@ Used by plugins for setting and notification functionality.
|
|||
from typing import Union
|
||||
from flask import current_app
|
||||
from werkzeug.exceptions import NotFound, BadRequest
|
||||
from sqlalchemy.exc import OperationalError
|
||||
from sqlalchemy.exc import OperationalError, ProgrammingError
|
||||
from flask_migrate import upgrade as database_upgrade
|
||||
from importlib.metadata import entry_points
|
||||
|
||||
|
@ -43,7 +43,7 @@ def get_enabled_plugins() -> list[Plugin]:
|
|||
"""Get all installed and enabled plugins"""
|
||||
try:
|
||||
enabled_plugins = Plugin.query.filter(Plugin.enabled == True).all()
|
||||
except OperationalError as e:
|
||||
except (OperationalError, ProgrammingError) as e:
|
||||
logger.error("Could not connect to database or database not initialized! No plugins enabled!")
|
||||
logger.debug("Can not query enabled plugins", exc_info=True)
|
||||
# Fake load required plugins so the database can at least be installed
|
||||
|
|
|
@ -27,8 +27,10 @@ install_requires =
|
|||
flask_cors
|
||||
flask_migrate>=3.1.0
|
||||
flask_sqlalchemy>=2.5.1
|
||||
sqlalchemy>=1.4.40
|
||||
sqlalchemy_utils>=0.38.3
|
||||
# Importlib requirement can be dropped when python requirement is >= 3.10
|
||||
importlib_metadata>=4.3
|
||||
sqlalchemy>=1.4.40, <2.0
|
||||
toml
|
||||
werkzeug>=2.2.2
|
||||
|
||||
|
|
Loading…
Reference in New Issue