Commit 51d9654a authored by Sietse Ringers's avatar Sietse Ringers
Browse files

feat: check affected row count when adding new email address to keyshare user

parent de1341b1
......@@ -196,6 +196,9 @@ func (db *postgresDB) addEmail(id int64, email string) error {
if err != nil {
return err
if aff > 1 {
return errors.Errorf("Unexpected number of affected rows %d for email adding", aff)
if aff == 1 {
return nil
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment