Skip to content
Snippets Groups Projects
Commit 395f5e76 authored by Pavel Vyskočil's avatar Pavel Vyskočil
Browse files

fix: rpc method for get facilities by attr with attrs

parent f9bc04a3
No related branches found
No related tags found
1 merge request!304fix: rpc method for get facilities by attr with attrs
......@@ -826,14 +826,18 @@ class AdapterRpc extends Adapter
public function getFacilitiesByAttributeWithAttributes($attributeName, $attributeValue, $attrNames)
{
$attrNamesMap = AttributeUtils::getRpcAttrNames($attrNames);
$facilitiesWithAttributes = $this->connector->post(
'facilitiesManager',
'getFacilitiesByAttributeWithAttributes',
['attributeName' => $attributeName, 'attributeValue' => $attributeValue, 'attrNames' => $attrNames]
[
'attributeName' => $attributeName,
'attributeValue' => $attributeValue,
'attrNames' => array_keys($attrNamesMap)
]
);
$attrNamesMap = AttributeUtils::getRpcAttrNames($attrNames);
foreach ($facilitiesWithAttributes as $key => $facilityWithAttributes) {
$facilitiesWithAttributes[$key]['attributes'] = $this->getAttributes(
$facilityWithAttributes['attributes'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment