bborn / lewsnetter

E-mail marketing application (create and send e-mail newsletter via SES). Includes subscription management, delivery, bounce and complaint notification, templates, and some stats.
MIT License
318 stars 42 forks source link

Approving a user through the interface fails. #4

Closed agustinf closed 8 years ago

agustinf commented 9 years ago

I approved the admin through the console with no trouble. When I try to update the second user through the interface, the log reads:

ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "users_pkey"
 DETAIL:  Key (id)=(1) already exists.
UPDATE "users" SET "approved" = $1, "first_name" = $2, "id" = $3, "is_admin" = $4, "last_name" = $5, "updated_at" = $6 WHERE "users"."id" = 2):

Seems it's trying to set its id to 1!