fixed comparisons for score parameter ingestion

This commit is contained in:
pushrbx 2022-12-19 12:10:02 +00:00 committed by GitHub
parent c5d17a52cf
commit cb3c46b6f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,21 +111,21 @@ abstract class MediaSearchQueryBuilder extends SearchQueryBuilder
->where('status', $status);
}
if ($score !== 0) {
if (!is_null($score)) {
$score = (float)$score;
$builder = $builder
->where('score', '>=', $score);
}
if ($min_score !== null) {
if (!is_null($min_score)) {
$min_score = (float)$min_score;
$builder = $builder
->where('score', '>=', $min_score);
}
if ($max_score !== null) {
if (!is_null($max_score)) {
$max_score = (float)$max_score;
$builder = $builder