Skip to content

Commit

Permalink
Fix pgsql binary resource handling for uuids (#2938)
Browse files Browse the repository at this point in the history
fixes #2934
  • Loading branch information
lippserd authored Dec 12, 2024
2 parents 89ebf71 + 175de1a commit d205415
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Icinga\Module\Director\DirectorObject\Lookup;

use gipfl\IcingaWeb2\Url;
use Icinga\Module\Director\Db\DbUtil;
use Icinga\Module\Director\Objects\IcingaHost;
use Icinga\Module\Director\Repository\IcingaTemplateRepository;
use Ramsey\Uuid\Uuid;
Expand Down Expand Up @@ -75,7 +76,7 @@ public static function find(IcingaHost $host, $serviceName)
$host->getObjectName(),
$serviceName,
$row->service_set_name,
Uuid::fromBytes($row->uuid)
Uuid::fromBytes(DbUtil::binaryResult($row->uuid))
);
}

Expand Down
3 changes: 2 additions & 1 deletion library/Director/Web/Table/ObjectsTableSetMembers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use gipfl\IcingaWeb2\Table\ZfQueryBasedTable;
use gipfl\IcingaWeb2\Url;
use Icinga\Module\Director\Db\DbSelectParenthesis;
use Icinga\Module\Director\Db\DbUtil;
use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
use Icinga\Module\Director\Objects\IcingaObject;
use Icinga\Module\Director\Restriction\FilterByNameRestriction;
Expand Down Expand Up @@ -97,7 +98,7 @@ public function renderRow($row)
{
$url = Url::fromPath('director/service/edit', [
'name' => $row->object_name,
'uuid' => Uuid::fromBytes($row->uuid)->toString(),
'uuid' => Uuid::fromBytes(DbUtil::binaryResult($row->uuid))->toString(),
]);

return static::tr([
Expand Down

0 comments on commit d205415

Please sign in to comment.