CustomVariables: Nicht überlagerte Variablen können invalid sein
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 23 Aug 2017 14:15:42 +0000 (16:15 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 24 Aug 2017 11:14:16 +0000 (13:14 +0200)
Muss beim autovivifien geprüft werden

SL/DB/Helper/CustomVariables.pm

index bf0616c..e8adfe8 100644 (file)
@@ -92,13 +92,12 @@ sub make_cvar_by_configs {
         my $cvar;
         if ( $cvars_by_config{$_->id} ) {
           $cvar = $cvars_by_config{$_->id};
-          $cvar->{is_valid} = !$invalids_by_config{$_->id};
         }
         else {
           $cvar = _new_cvar($self, %params, config => $_);
           $self->add_custom_variables($cvar);
-          $cvar->{is_valid} = 1;
         }
+        $cvar->{is_valid} = !$invalids_by_config{$_->id};
         $cvar->{config}   = $_;
         $cvar;
       }