GetModels-Filtered: CVars: default_value-Ersetzung besser greifen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 17 Feb 2015 14:19:29 +0000 (15:19 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 5 Mar 2015 12:42:58 +0000 (13:42 +0100)
SL/DB/Helper/CustomVariables.pm

index fef521c..97837a2 100644 (file)
@@ -309,7 +309,7 @@ sub make_cvar_custom_filter {
         query_is_sql       => 1,
       );
 
-      $query{config} =~ s{ \bdefault_value\b \s*=\s* (?!'') }{default_value::${conversion} = }x if $conversion;
+      $query{config} =~ s{ (?<! NOT\( ) default_value (?! \s*is\s+not\s+null) }{default_value::${conversion}}x if $conversion;
 
       ($query{not_customized}, $bind_vals{not_customized}) = Rose::DB::Object::QueryBuilder::build_select(
         dbh          => $config->dbh,