Skip to content

Commit

Permalink
fix: fix entity update passing null values
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Ixo committed May 29, 2024
1 parent ebe109f commit 2bb5cb7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/postgres/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ UPDATE "public"."Entity" SET
"credentials" = $6,
"entityVerified" = $7,
"metadata" = $8,
"accounts" = $9,
"externalId" = $10,
"owner" = $11
"accounts" = $9
WHERE
"id" = $12;
"id" = $10;
`;
export const updateEntity = async (p: Entity): Promise<void> => {
try {
Expand All @@ -69,8 +67,6 @@ export const updateEntity = async (p: Entity): Promise<void> => {
p.entityVerified,
JSON.stringify(p.metadata),
JSON.stringify(p.accounts),
p.externalId,
p.owner,
p.id,
]);
} catch (error) {
Expand Down

0 comments on commit 2bb5cb7

Please sign in to comment.