We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ae93c4 commit 7dc30a1Copy full SHA for 7dc30a1
gramps_webapi/undodb.py
@@ -43,6 +43,7 @@
43
Text,
44
create_engine,
45
)
46
+from sqlalchemy.exc import OperationalError
47
from sqlalchemy.orm import declarative_base, relationship, sessionmaker
48
from sqlalchemy.sql import func
49
@@ -205,7 +206,11 @@ def open(self, value=None) -> None:
205
206
"""
207
Open the backing storage.
208
- Base.metadata.create_all(self.engine)
209
+ try:
210
+ Base.metadata.create_all(self.engine)
211
+ except OperationalError as e:
212
+ if "already exists" not in str(e):
213
+ raise
214
215
def _make_connection_id(self) -> int:
216
"""Insert a row into the connection table."""
0 commit comments