From 66c389abfaa45203206ae066367f0dec9f014e43 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Fri, 10 Nov 2023 16:50:44 +0200 Subject: [PATCH] Add a getter for destinations to the Source. --- tui_rsync/models/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tui_rsync/models/models.py b/tui_rsync/models/models.py index 269f8ff..3549497 100644 --- a/tui_rsync/models/models.py +++ b/tui_rsync/models/models.py @@ -90,6 +90,14 @@ class Source(BaseModel): path=destination_path ) + def get_destinations(self): + destionations = [] + + for dest in self.destinations: + destionations.append(dest.path) + + return destionations + def update_label(self, new_label): self.label = new_label self.save()