Skip to content

Commit

Permalink
alter=True when upserting users
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Oct 7, 2019
1 parent 8c6251c commit 552543a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github_to_sqlite/utils.py
Expand Up @@ -58,7 +58,7 @@ def save_user(db, user):
# so fill in 'name' from 'login' so Datasette foreign keys display
if to_save.get("name") is None:
to_save["name"] = to_save["login"]
return db["users"].upsert(to_save, pk="id").last_pk
return db["users"].upsert(to_save, pk="id", alter=True).last_pk


def save_milestone(db, milestone):
Expand Down

0 comments on commit 552543a

Please sign in to comment.