Merge pull request #9564 from Wachizungu/fix-objects-restsearch-first-seen

fix: fix objects restsearch first_seen filter
notes
Andras Iklody 2024-02-15 17:26:43 +01:00 committed by GitHub
commit aa67046917
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -2428,7 +2428,7 @@ class Attribute extends AppModel
$conditions['AND'][] = array($scope . ' <=' => $timestamp[1]);
} else {
$timestamp = intval($this->resolveTimeDelta($timestamp)) * 1000000; // seen in stored in micro-seconds in the DB
if ($scope == 'Attribute.first_seen') {
if ($scope == 'Attribute.first_seen' || $scope == 'Object.first_seen') {
$conditions['AND'][] = array($scope . ' >=' => $timestamp);
} else {
$conditions['AND'][] = array($scope . ' <=' => $timestamp);