fix: fix objects restsearch first_seen filter

pull/9564/head
Jeroen Pinoy 2024-02-14 15:40:06 +01:00
parent cc10d2a741
commit bf6a148bc8
No known key found for this signature in database
GPG Key ID: DF33A50B8E4EE081
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);