diff options
Diffstat (limited to 'lib/Kratos/DFADriver/Model.pm')
-rw-r--r-- | lib/Kratos/DFADriver/Model.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Kratos/DFADriver/Model.pm b/lib/Kratos/DFADriver/Model.pm index aff44cf..216f3b8 100644 --- a/lib/Kratos/DFADriver/Model.pm +++ b/lib/Kratos/DFADriver/Model.pm @@ -144,6 +144,10 @@ sub new_from_repo { @states = uniq @states; @states = sort @states; + # by convention, UNINITIALIZED always has ID 0 + @states = grep { $_ ne 'UNINITIALIZED' } @states; + unshift( @states, 'UNINITIALIZED' ); + for my $i ( 0 .. $#states ) { $self->{state}{ $states[$i] } = { id => $i, |