Skip to content

Commit 192c8d0

Browse files
authored
Merge pull request #89 from viktoraseev/viktoraseev-clean-all-doesnt-work-as-intended
Fix Clean All Flag Handling
2 parents e7aae2f + 3c3a949 commit 192c8d0

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'") == 1:
145+
if self._read("SELECT value FROM settings WHERE name='CleanDB'") == '2':
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", 1)
188+
JalSettings().setValue("CleanDB", 2)
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)