mirror of
https://gitlab.com/KKlochko/tui-rsync.git
synced 2026-08-20 05:37:43 +00:00
Add the method to update a source path.
This commit is contained in:
@@ -94,6 +94,11 @@ class Source(BaseModel):
|
|||||||
self.label = new_label
|
self.label = new_label
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
|
def update_source_path(self, new_path):
|
||||||
|
new_source_path, _ = Path.get_or_create(path=new_path)
|
||||||
|
self.source = new_source_path
|
||||||
|
self.save()
|
||||||
|
|
||||||
def update_args(self, args):
|
def update_args(self, args):
|
||||||
args_obj = SyncCommand.get_sync_command(args)
|
args_obj = SyncCommand.get_sync_command(args)
|
||||||
self.args = args_obj
|
self.args = args_obj
|
||||||
|
|||||||
Reference in New Issue
Block a user