Updated get_db_version and associated tests

This commit is contained in:
Rhet Turnbull
2019-11-30 21:39:58 -08:00
parent d056b6f8c0
commit eb563ad297
6 changed files with 10 additions and 107 deletions

View File

@@ -387,10 +387,7 @@ class PhotosDB:
c.execute(
"SELECT value from LiGlobals where LiGlobals.keyPath is 'libraryVersion'"
)
for ver in c:
version = ver[0]
break # TODO: is there a more pythonic way to do get the first element from cursor?
version = c.fetchone()[0]
conn.close()
if version not in _TESTED_DB_VERSIONS: