Skip to content

Commit

Permalink
fix jointure
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Apr 20, 2024
1 parent 22cdee0 commit ea418b7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions repository/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,13 @@ export async function getDossierVotes(
"id as group_id",
"organeRefUid",
"positionMajoritaire as group_position",
"hash",
])
.from("GroupeVotant")
.as("groupeVotant");
},
"Vote.groupeVotantRefId",
"groupeVotant.group_id"
"groupeVotant.hash"
)
.leftJoin(
function () {
Expand All @@ -427,9 +428,7 @@ export async function getDossierVotes(
},
"groupeVotant.organeRefUid",
"organe.organe_uid"
)
.options({ nestTables: true });

);
return { votes, acts };
} catch (error) {
console.error("Error fetching rows from Dossier:", error);
Expand Down

0 comments on commit ea418b7

Please sign in to comment.