mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pamhyr: Fixing pep8 and use RD and RG by default at update PK (if exists).
This commit is contained in:
1 parent
2ee8420b94
commit
6c4b67d93a
3 files changed
+32
-18
No files matched your search
+5
-3
@@ -270,8 +270,10 @@ class Study(SQLModel):
|
||||
def _load(cls, filename):
|
||||
new = cls(init_new=False, filename=filename)
|
||||
|
||||
version = new.execute("SELECT value FROM info WHERE key='study_release'")[0]
|
||||
new.status.version = int(version)
|
||||
version = new.execute(
|
||||
"SELECT value FROM info WHERE key='study_release'"
|
||||
)
|
||||
new.status.version = int(version[0])
|
||||
|
||||
# TODO: Load metadata
|
||||
new.name = new.execute("SELECT value FROM info WHERE key='name'")[0]
|
||||
@@ -308,7 +310,7 @@ class Study(SQLModel):
|
||||
progress = progress if progress is not None else lambda: None
|
||||
|
||||
self.execute(
|
||||
"INSERT INTO info VALUES ('study_release', "+
|
||||
"INSERT INTO info VALUES ('study_release', " +
|
||||
f"'{self.status.version}')"
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user