Skip to content

Commit

Permalink
If login_remaining is an empty string treat it as NULL
Browse files Browse the repository at this point in the history
Fixes #8506
  • Loading branch information
jrouzierinverse committed Jan 21, 2025
1 parent 32d1179 commit f9ee855
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pf/UnifiedApi/Controller/Users/Password.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f9ee855

Please sign in to comment.