diff --git a/application/Espo/ORM/QueryComposer/BaseQueryComposer.php b/application/Espo/ORM/QueryComposer/BaseQueryComposer.php index e68d76fa2d..1c4d887ba6 100644 --- a/application/Espo/ORM/QueryComposer/BaseQueryComposer.php +++ b/application/Espo/ORM/QueryComposer/BaseQueryComposer.php @@ -2268,7 +2268,7 @@ abstract class BaseQueryComposer implements QueryComposer $fieldPath = $this->getAttributePathForOrderBy($entity, $orderBy, $params ?? []); - if (!$fieldPath) { + if ($fieldPath === null || $fieldPath === '') { throw new LogicException("Could not handle 'order' for '".$entity->getEntityType()."'."); }