Skip to content
Snippets Groups Projects

fix: rpc method for get facilities by attr with attrs

Merged Pavel Vyskočil requested to merge fix_rpc into main
1 file
+ 7
3
Compare changes
  • Side-by-side
  • Inline
+ 7
3
@@ -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'],
Loading