[pve-devel] [PATCH manager 2/3] replication: target is a required parameter

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Aug 11 14:30:25 CEST 2020


no need to check for definedness

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 PVE/API2/ReplicationConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/ReplicationConfig.pm b/PVE/API2/ReplicationConfig.pm
index a8c6213a..4a25a92b 100644
--- a/PVE/API2/ReplicationConfig.pm
+++ b/PVE/API2/ReplicationConfig.pm
@@ -123,7 +123,7 @@ __PACKAGE__->register_method ({
 	die "Guest '$guest' does not exist.\n"
 	    if !defined($guest_info);
 	die "Target '$param->{target}' does not exist.\n"
-	    if defined($param->{target}) && !defined($nodelist->{$param->{target}});
+	    if !defined($nodelist->{$param->{target}});
 
 	my $source = $guest_info->{node};
 	die "Source '$param->{source}' does not match current node of guest '$guest'\n"
-- 
2.20.1





More information about the pve-devel mailing list