Skip to content

Commit

Permalink
Fix pgsql binary resource handling for uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
raviks789 committed Dec 5, 2024
1 parent 4032d49 commit 1c45333
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 1c45333

Please sign in to comment.