Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Fix distinct statement
Browse files Browse the repository at this point in the history
  • Loading branch information
fgblomqvist committed Jul 22, 2018
1 parent ef32eac commit 724da1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scuevals_api/resources/official_user_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def post(self, args):
sql = text(r"""
with upsert as (
insert into official_user_type (email, type, university_id)
select distinct on (u->>'email')
select distinct on (lower(u->>'email'))
lower(u->>'email') as new_email,
lower(u->>'type') as new_type,
:u_id
Expand Down

0 comments on commit 724da1e

Please sign in to comment.