Add the query exception and refactor get_by_id.

This commit is contained in:
2025-01-26 15:35:41 +02:00
parent d652469748
commit 476a0ef8cf
5 changed files with 35 additions and 8 deletions
@@ -24,14 +24,17 @@ from tui_rsync.core.components.backup_plan.application.queries import GetAllBack
from tui_rsync.core.components.backup_plan.application.services.backup_plan_service import BackupPlanService
from tui_rsync.core.shared_kernel.components.common import UUID
from tui_rsync.core.shared_kernel.ports.Exceptions.query_exception import QueryException
from tui_rsync.infrastructure.configuration import CurrentConfiguration
from tui_rsync.user_interface.cli.components.backup_plan.formating import BackupPlanFormat
from tui_rsync.user_interface.cli.shared_kernel.components.errors.applications.exceptions import catch_exception
console = Console()
show_backup_plan = typer.Typer()
@show_backup_plan.command()
@catch_exception(QueryException, 1)
def one(
id: str = typer.Option(
None, "--id", "-i",