mirror of https://github.com/gmbrax/Pilgrim.git
Update src/pilgrim/ui/screens/diary_list_screen.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
209099cc5e
commit
7c950b93ab
|
|
@ -306,13 +306,10 @@ class DiaryListScreen(Screen):
|
||||||
session = self.app.service_manager.get_session()
|
session = self.app.service_manager.get_session()
|
||||||
if session:
|
if session:
|
||||||
backup_service = BackupService(session)
|
backup_service = BackupService(session)
|
||||||
result_operation,result_data = backup_service.create_backup()
|
result_operation, result_data = backup_service.create_backup()
|
||||||
|
if result_operation:
|
||||||
|
self.notify(f"Backup result: {result_data}")
|
||||||
|
else:
|
||||||
|
self.notify(f"Error performing backup: {result_data}")
|
||||||
else:
|
else:
|
||||||
self.notify("You must be logged in to perform this action")
|
self.notify("You must be logged in to perform this action")
|
||||||
if result_operation:
|
|
||||||
self.notify(f"Backup result: {result_data}")
|
|
||||||
else:
|
|
||||||
self.notify(f"Error performing backup {result_data}")
|
|
||||||
raise Exception("Error performing backup")
|
|
||||||
self.app.exit()
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue