forked from Hay1tsme/artemis
database: fix error when trying to upgrade the schema for a game that wasn't created yet
This commit is contained in:
parent
02e1838d95
commit
4f3d3d8395
@ -85,7 +85,12 @@ class BaseData():
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
return None
|
||||
return result.fetchone()["version"]
|
||||
|
||||
row = result.fetchone()
|
||||
if row is None:
|
||||
return None
|
||||
|
||||
return row["version"]
|
||||
|
||||
def set_schema_ver(self, ver: int, game: str = "CORE") -> Optional[int]:
|
||||
sql = insert(schema_ver).values(game = game, version = ver)
|
||||
|
Loading…
Reference in New Issue
Block a user