Skip to content

Commit 27a5052

Browse files
committed
"CleanDB" parameter value was made more readable (from '2' to 'yes')
1 parent 192c8d0 commit 27a5052

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jal/db/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def init_db(self) -> JalDBError:
142142
error = self.run_sql_script(self.get_app_path() + Setup.INIT_SCRIPT_PATH)
143143
if error.code != JalDBError.NoError:
144144
return error
145-
if self._read("SELECT value FROM settings WHERE name='CleanDB'") == '2':
145+
if self._read("SELECT value FROM settings WHERE name='CleanDB'") == 'yes':
146146
db.close()
147147
os.remove(self.get_db_path())
148148
db.open()

jal/widgets/main_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def onCleanDB(self, action):
185185
self.tr("All data will be deleted. The actions can't be undone.\nAre you sure?"),
186186
QMessageBox.Yes, QMessageBox.No) == QMessageBox.No:
187187
return
188-
JalSettings().setValue("CleanDB", 2)
188+
JalSettings().setValue("CleanDB", "yes")
189189
QMessageBox().information(self, self.tr("Restart required"),
190190
self.tr("Database will be removed at next JAL start.\n"
191191
"Application will be terminated now."),

0 commit comments

Comments
 (0)