fix: [internal] Fixed uuid/id lookups not working on the attribute level

pull/4019/head
iglocska 2019-01-16 11:08:42 +01:00
parent 62a171993e
commit 9318d63156
1 changed files with 4 additions and 4 deletions

View File

@ -2218,10 +2218,10 @@ class Event extends AppModel
{
if (!empty($params['uuid'])) {
$params['uuid'] = $this->convert_filters($params['uuid']);
if (!empty($options['scope']) || $options['scope'] === 'Event') {
if (!empty($options['scope']) && $options['scope'] === 'Event') {
$conditions = $this->generic_add_filter($conditions, $params['uuid'], 'Event.uuid');
}
if (!empty($options['scope']) || $options['scope'] === 'Attribute') {
if (!empty($options['scope']) && $options['scope'] === 'Attribute') {
$conditions = $this->generic_add_filter($conditions, $params['uuid'], 'Attribute.uuid');
}
}
@ -2232,10 +2232,10 @@ class Event extends AppModel
{
if (!empty($params['mixed_id'])) {
$params['mixed_id'] = $this->convert_filters($params['mixed_id']);
if (!empty($options['scope']) || $options['scope'] === 'Event') {
if (!empty($options['scope']) && $options['scope'] === 'Event') {
$conditions = $this->generic_add_filter($conditions, $params['uuid'], 'Event.uuid');
}
if (!empty($options['scope']) || $options['scope'] === 'Attribute') {
if (!empty($options['scope']) && $options['scope'] === 'Attribute') {
$conditions = $this->generic_add_filter($conditions, $params['uuid'], 'Attribute.uuid');
}
}