Merge pull request #595 from langflow-ai/unnecessary-notification

unnecessary notification
This commit is contained in:
Sebastián Estévez 2025-12-03 13:42:19 -05:00 committed by GitHub
commit bc022f5903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -493,13 +493,14 @@ class MonitorScreen(Screen):
if conversations_file.exists(): if conversations_file.exists():
conversations_file.unlink() conversations_file.unlink()
# Delete flow backups only if user chose to # Delete flow backups only if user chose to (and they actually exist)
if delete_backups and flows_backup_path.exists(): if self._check_flow_backups():
if delete_backups:
shutil.rmtree(flows_backup_path) shutil.rmtree(flows_backup_path)
# Recreate empty backup directory # Recreate empty backup directory
flows_backup_path.mkdir(parents=True, exist_ok=True) flows_backup_path.mkdir(parents=True, exist_ok=True)
self.notify("Flow backups deleted", severity="information") self.notify("Flow backups deleted", severity="information")
elif flows_backup_path.exists(): else:
self.notify("Flow backups preserved in ./flows/backup", severity="information") self.notify("Flow backups preserved in ./flows/backup", severity="information")
except Exception as e: except Exception as e: