Fixed NPM filter

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
Roland Dalmulder 2023-08-25 20:34:03 +02:00
parent bafb673cbf
commit d1419dc893
No known key found for this signature in database
GPG Key ID: 6D30CD38749A5B9E
1 changed files with 4 additions and 5 deletions

View File

@ -256,11 +256,10 @@ class PullsModel extends ListModel
$query->where($db->quoteName('pulls.is_rtc') . ' = ' . $value);
}
$npm = $this->getState()->get('filter.npm');
if (!empty($npm)) {
// Not applied patches have a NULL value, so build our value part of the query based on this
$value = $npm === 'no' ? '0' : '1';
$query->where($db->quoteName('pulls.is_npm') . ' = ' . $value);
$npm = $this->getState()->get('filter.npm', '');
if (strlen($npm) === 1) {
$query->where($db->quoteName('pulls.is_npm') . ' = ' . (int) $npm);
}
$draft = $this->getState()->get('filter.draft');