Fixing bug showing doctor top.

This commit is contained in:
sergiotarxz 2022-02-10 03:04:58 +01:00
parent 2f2f86316c
commit 4ef5513b5f

View File

@ -286,6 +286,11 @@ EOF
for my $key_field ( keys %$user_db ) {
$user_db->{$key_field} // delete $user_db->{$key_field};
}
if ( defined $user_db->{last_karma_given_date} ) {
my $iso8601 = DateTime::Format::ISO8601->new;
$user_db->{last_karma_given_date} =
$iso8601->parse_datetime( $user_db->{last_karma_given_date} );
}
push @$users, DoctorKarma::Model::User->new(%$user_db);
}
return $users;
@ -307,6 +312,11 @@ EOF
for my $key_field ( keys %$user_db ) {
$user_db->{$key_field} // delete $user_db->{$key_field};
}
if ( defined $user_db->{last_karma_given_date} ) {
my $iso8601 = DateTime::Format::ISO8601->new;
$user_db->{last_karma_given_date} =
$iso8601->parse_datetime( $user_db->{last_karma_given_date} );
}
push @$users, DoctorKarma::Model::User->new(%$user_db);
}
return $users;