Skip to content

Commit

Permalink
chore: remove redundant limit 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevespi committed Mar 14, 2024
1 parent d62f83a commit a6a0813
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schema/deploy/mutations/commit_form_change.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ begin

return (select cif_private.commit_form_change_internal(
(select row(form_change.*)::cif.form_change from cif.form_change where id = row_id),
-- This is guaranteed to be a single row as we have unique inidices on pending general revision and pending amendment
(select id from cif.project_revision
where project_id=(select project_id from cif.project_revision where id = form_change_patch.project_revision_id)
and change_status = 'pending' and id != form_change_patch.project_revision_id limit 1)
and change_status = 'pending' and id != form_change_patch.project_revision_id)
));
end;
$$ language plpgsql volatile;
Expand Down

0 comments on commit a6a0813

Please sign in to comment.