diff --git a/lib/pf/UnifiedApi/Controller/Users/Password.pm b/lib/pf/UnifiedApi/Controller/Users/Password.pm index 191f404ffcf9..89cb53b1f6ab 100644 --- a/lib/pf/UnifiedApi/Controller/Users/Password.pm +++ b/lib/pf/UnifiedApi/Controller/Users/Password.pm @@ -74,6 +74,13 @@ sub _handle_password_data { } } + if (exists $data->{login_remaining}) { + my $login_remaining = $data->{login_remaining}; + if (defined $login_remaining && $login_remaining eq '') { + $data->{login_remaining} = undef; + } + } + # Not sure why but currently in the cloudnac, the sponsor field breaks the insert # This is a temporary fix, we should figure out why this happens $data->{sponsor} = ($data->{sponsor} // "") ne "" ? $data->{sponsor} : 0;