PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_student_rewards_on_student_id_and_reward_type" | |
DETAIL: Key (student_id, reward_type)=(2, silver) already exists. | |
: INSERT INTO "student_rewards" ("created_at", "reward_type", "student_exam_id", "student_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/app/models/concerns/exam_utility.rb:85:in `set_reward' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/app/models/concerns/exam_utility.rb:74:in `reward!' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:99:in `block in create_student_exams' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:77:in `times' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:77:in `each' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:77:in `create_student_exams' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:63:in `block (4 levels) in <top (required)>' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:60:in `times' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:60:in `each' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:60:in `block (3 levels) in <top (required)>' | |
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/database.rake:38:in `block (2 levels) in <top (required)>' | |
Tasks: TOP => db:fake_seed:populate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment