Bug 22729: Adapt Koha::Patron(s) and tests
[koha-equinox.git] / Koha / Patron.pm
index c332628..6a25d71 100644 (file)
@@ -1362,12 +1362,12 @@ sub anonymize {
         split /\s*\|\s*/, C4::Context->preference('BorrowerMandatoryField') };
     $mandatory->{userid} = 1; # needed since sub store does not clear field
     my @columns = $self->_result->result_source->columns;
-    @columns = grep { !/borrowernumber|branchcode|categorycode|^date|password|flags|updated_on|lastseen|lang|login_attempts|flgAnonymized/ } @columns;
+    @columns = grep { !/borrowernumber|branchcode|categorycode|^date|password|flags|updated_on|lastseen|lang|login_attempts|anonymized/ } @columns;
     push @columns, 'dateofbirth'; # add this date back in
     foreach my $col (@columns) {
         $self->_anonymize_column($col, $mandatory->{lc $col} );
     }
-    $self->flgAnonymized(1)->store;
+    $self->anonymized(1)->store;
 }
 
 sub _anonymize_column {