cwru-hvz-core / cwru-hvz-source

Case Western's Implementation of a Humans vs. Zombies tracking engine.
http://hvz.case.edu/
10 stars 9 forks source link

Admin zombification does not work #100

Open jameshochadel opened 7 years ago

jameshochadel commented 7 years ago

Admins on the site cannot zombify a player using /tags/new.

Typically when a tag is credited to "Administrative Zombification," it appears that the tag is credited to tagger_id:0. However, it seems that id=0 gets lost somewhere in the path from view to controller to model, because the error message reports that an unrelated registration "is not a zombie," seemingly implying that the admin tried crediting the tag to them. It looks like it always tries crediting it to the Registration with the highest ID.

Trying to zombify this registration: #<Registration id: 2998, person_id: 1947, game_id: 13, faction_id: 0, card_code: "852744", score: 2950, is_oz: fal│ se, created_at: "2017-03-24 23:18:56", updated_at: "2017-03-25 15:00:33", wants_oz: false, is_off_campus: false, squad│ _id: 396, human_type: "Resistance"> #<Person id: 1947, name: "Francis O'Brien", caseid: "fgo3", picture: nil, phone: "2162624662", last_login: nil, is│ _admin: false, created_at: "2016-09-29 16:32:38", updated_at: "2016-09-29 16:34:07", date_of_birth: "1998-02-27">

...resulted in this error: Tagger #<Registration id: 3000, person_id: 610, game_id: 13, faction_id: 0, card_code: "F84265", score: 2950, is_oz: false, created_at: "2017-03-25 15:07:31", updated_at: "2017-03-25 15:07:44", wants_oz: nil, is_off_campus: nil, squad_id: nil, human_type: nil> is not a zombie!