File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -539,12 +539,9 @@ impl RegistrarClient {
539539 . map_err ( KeylimectlError :: from) ?;
540540
541541 // Extract agent data from registrar response format
542+ // The registrar API returns agent data directly in "results", not nested under agent UUID
542543 if let Some ( results) = json_response. get ( "results" ) {
543- if let Some ( agent_data) = results. get ( agent_uuid) {
544- Ok ( Some ( agent_data. clone ( ) ) )
545- } else {
546- Ok ( None )
547- }
544+ Ok ( Some ( results. clone ( ) ) )
548545 } else {
549546 Ok ( Some ( json_response) )
550547 }
Original file line number Diff line number Diff line change @@ -1969,7 +1969,10 @@ mod tests {
19691969 push_model : false ,
19701970 } ;
19711971
1972- assert_eq ! ( params. agent_id, "550e8400-e29b-41d4-a716-446655440000" ) ;
1972+ assert_eq ! (
1973+ params. agent_id,
1974+ "550e8400-e29b-41d4-a716-446655440000"
1975+ ) ;
19731976 assert ! ( params. ip. is_none( ) ) ;
19741977 assert ! ( params. port. is_none( ) ) ;
19751978 assert ! ( !params. verify) ;
You can’t perform that action at this time.
0 commit comments