Skip to content

Commit

Permalink
enh: improve formatting, add exception to log
Browse files Browse the repository at this point in the history
Signed-off-by: Cleopatra Enjeck M <patrathewhiz@gmail.com>
  • Loading branch information
enjeck committed Jul 1, 2024
1 parent 2a985b0 commit b3d731e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/Db/ContextNodeRelationMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public function deleteAllByContextId(int $contextId): void {

public function getRelIdsForNode(int $nodeId, int $nodeType): array {
$qb = $this->db->getQueryBuilder();
$qb->select('id')->from($this->table)->where($qb->expr()->eq('node_id', $qb->createNamedParameter($nodeId)))
->andWhere($qb->expr()->eq('node_type', $qb->createNamedParameter($nodeType)));
$qb->select('id')->from($this->table)
->where($qb->expr()->eq('node_id', $qb->createNamedParameter($nodeId)))
->andWhere($qb->expr()->eq('node_type', $qb->createNamedParameter($nodeType)));
$result = $qb->executeQuery();
$nodeRelIds = [];
while ($row = $result->fetch()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/ContextService.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function deleteNodeRel(int $nodeId, int $nodeType): void {
}

} catch (Exception $e) {
$this->logger->error('something went wrong while deleting node relation for node id: '.(string)$nodeId. ' and node type '.(string)$nodeType);
$this->logger->error('Something went wrong while deleting node relation for node id: ' . (string)$nodeId . ' and node type ' . (string)$nodeType, ['exception' => $e]);
}
}

Expand Down

0 comments on commit b3d731e

Please sign in to comment.