Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_placement(student)
- team = @consultancy.teams.detect{|x| x.has_room && student.objective_students.find_by(:objective => x.objective).obj_ready_and_willing?}
- team.users << student if team
- return team
- end
- PG::ForeignKeyViolation: ERROR: insert or update on table "teams_users" violates foreign key constraint "fk_rails_8299e376e9" DETAIL: Key (team_id)=(3396) is not present in table "teams". : INSERT INTO "teams_users" ("user_id", "team_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement