Update the replace command to show responses.

This commit is contained in:
2025-01-29 21:08:52 +02:00
parent cabcde00c7
commit 2438dead07
2 changed files with 11 additions and 2 deletions
@@ -29,7 +29,10 @@ class BackupPlanRepository(BackupPlanRepositoryPort):
def update(self, backup_plan: BackupPlan):
updated_model = BackupPlanDTO.to_model(backup_plan)
model = BackupPlanModel.get_or_none(BackupPlanModel.id == updated_model.id)
query = GetBackupPlanByIdQuery(self.databaseManager)
old_plan = query.execute(backup_plan.id)
model = BackupPlanDTO.to_model(old_plan)
remove_backup_plan_destinations_command = RemoveBackupPlanDestinationsCommand(self.databaseManager)
model.label = updated_model.label