Bug 17257: Fix add/edit patrons under MySQL 5.7
[koha.git] / C4 / Members.pm
index fe40188..6eff6d7 100644 (file)
@@ -759,6 +759,7 @@ sub AddMember {
     # we don't want invalid dates in the db (mysql has a bad habit of inserting 0000-00-00
     $data{'dateofbirth'} = undef if( not $data{'dateofbirth'} );
     $data{'debarred'} = undef if ( not $data{'debarred'} );
+    $data{'guarantorid'} = undef if ( not $data{'guarantorid'} );
 
     # get only the columns of Borrower
     my @columns = $schema->source('Borrower')->columns;