| Lines 649-666
          if(!defined($data{'sex'})){
      
      
        Link Here | 
        
          | 649 |  | 649 |  | 
        
          | 650 | ##Now all the data to modify a member. | 650 | ##Now all the data to modify a member. | 
        
          | 651 |  | 651 |  | 
          
            
              | 652 | my $patron_categories = Koha::Patron::Categories->search_with_library_limits( | 652 | my @typeloop; | 
            
              | 653 |     { | 653 | my $no_categories = 1; | 
            
              | 654 |         category_type => [qw(C A S P I X)], | 654 | my $no_add; | 
            
              | 655 |         ( $guarantor_id ? ( can_be_guarantee => 1 ) : () ) | 655 | foreach my $category_type (qw(C A S P I X)) { | 
            
              | 656 |     }, | 656 |     my $categories_limits = { category_type => $category_type }; | 
            
              | 657 |     { order_by => ['categorycode'] } | 657 |     $categories_limits->{canbeguarantee} = 1 if ($guarantor_id); | 
            
              | 658 | ); | 658 |     my $patron_categories = Koha::Patron::Categories->search_with_library_limits( $categories_limits, {order_by => ['categorycode']} ); | 
            
              | 659 | my $no_categories = ! $patron_categories->count; | 659 |     $no_categories = 0 if $patron_categories->count > 0; | 
            
              | 660 | my $categories = {}; |  |  | 
            
              | 661 | foreach my $patron_category ($patron_categories->as_list ) { | 
            
              | 662 |     push @{ $categories->{ $patron_category->category_type } }, $patron_category; | 
            
              | 663 | } | 
        
          | 664 |  | 660 |  | 
        
          | 665 | $template->param( | 661 | $template->param( | 
        
          | 666 |     patron_categories => $categories, | 662 |     patron_categories => $categories, | 
            
              | 667 | -  |  |  |