From f34a15013dd027c352d920fcc8a4454df5a26059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20P=C3=A4iv=C3=A4rinta?= Date: Thu, 18 Jan 2024 18:08:24 +0100 Subject: [PATCH] Clean up unused argument For some reason get_test_results used to add 'ns' arguments to entries from the Nameserver module. These are interpolated into the message anyway, and no other entries are returned with raw arguments. In #1092 we accidentally broke this behavior, but since the behavior was undocument and unintended, it's better to clean it up than to fix it. --- lib/Zonemaster/Backend/RPCAPI.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Zonemaster/Backend/RPCAPI.pm b/lib/Zonemaster/Backend/RPCAPI.pm index 48d98830e..b65329c26 100644 --- a/lib/Zonemaster/Backend/RPCAPI.pm +++ b/lib/Zonemaster/Backend/RPCAPI.pm @@ -404,10 +404,7 @@ sub get_test_results { my $test_info = $self->{db}->test_results( $params->{id} ); foreach my $test_res ( @{ $test_info->{results} } ) { my $res; - if ( $test_res->{module} eq 'NAMESERVER' ) { - $res->{ns} = ( $test_res->{args}->{ns} ) ? ( $test_res->{args}->{ns} ) : ( 'All' ); - } - elsif ($test_res->{module} eq 'SYSTEM' + if ($test_res->{module} eq 'SYSTEM' && $test_res->{tag} eq 'POLICY_DISABLED' && $test_res->{args}->{name} eq 'Example' ) {