Skip to content

Commit d1419dc

Browse files
committed
Fixed NPM filter
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
1 parent bafb673 commit d1419dc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

administrator/components/com_patchtester/src/Model/PullsModel.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,10 @@ protected function getListQuery()
256256
$query->where($db->quoteName('pulls.is_rtc') . ' = ' . $value);
257257
}
258258

259-
$npm = $this->getState()->get('filter.npm');
260-
if (!empty($npm)) {
261-
// Not applied patches have a NULL value, so build our value part of the query based on this
262-
$value = $npm === 'no' ? '0' : '1';
263-
$query->where($db->quoteName('pulls.is_npm') . ' = ' . $value);
259+
$npm = $this->getState()->get('filter.npm', '');
260+
261+
if (strlen($npm) === 1) {
262+
$query->where($db->quoteName('pulls.is_npm') . ' = ' . (int) $npm);
264263
}
265264

266265
$draft = $this->getState()->get('filter.draft');

0 commit comments

Comments
 (0)