]> git.proxmox.com Git - pve-manager.git/commitdiff
Set source when creating a new replication job
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 10 Aug 2020 12:35:52 +0000 (14:35 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 11 Aug 2020 11:54:21 +0000 (13:54 +0200)
If source is missing, pvesr will set it via job_status
on the next run. But the info is already present here,
so it doesn't hurt to use it.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/ReplicationConfig.pm

index 2b4ecd10bddf333b48dd15ac52f22a8949f224ef..b85e580453fbbcf968c59149360af467c43d973b 100644 (file)
@@ -138,6 +138,7 @@ __PACKAGE__->register_method ({
            my $opts = $plugin->check_config($id, $param, 1, 1);
 
            $opts->{guest} = $guest;
+           $opts->{source} //= $vmlist->{ids}->{$guest}->{node};
 
            $cfg->{ids}->{$id} = $opts;