Add the method to update a source path.

This commit is contained in:
2023-06-23 19:12:51 +03:00
parent be45f04af7
commit 3c393509eb
+5
View File
@@ -94,6 +94,11 @@ class Source(BaseModel):
self.label = new_label
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):
args_obj = SyncCommand.get_sync_command(args)
self.args = args_obj