Changeset 1779


Ignore:
Timestamp:
05/31/16 10:28:47 (8 years ago)
Author:
nanardon
Message:

Fix value checking when searching NULL value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm

    r1778 r1779  
    754754 
    755755        # Invalid filter due to impossible value: 
    756         if (!$attribute->checkinputformat($val) && $mode ne '~') { 
    757             $base->log(LA_ERR, "Invalid format value $val for attribute $attr"); 
    758             return; 
    759         } 
    760  
    761         $val = $attribute->input($val); 
     756        if ($mode ne '~' && !($mode eq '=' && $val eq 'NULL')) { 
     757            if (!$attribute->checkinputformat($val)) { 
     758                $base->log(LA_ERR, "Invalid format value $val for attribute $attr"); 
     759                return; 
     760            } 
     761        } 
     762 
     763        $val = $attribute->input($val) unless($mode eq '=' && $val eq 'NULL'); 
    762764 
    763765        my $sql; 
Note: See TracChangeset for help on using the changeset viewer.