AgileVentures / MetPlus_tracker

Git Repository for the Waffle issue in MetPlus project
2 stars 4 forks source link

(Prod) Error while editing Agency Person #687

Closed joaopapereira closed 6 years ago

joaopapereira commented 6 years ago

When I login as agency admin and try to edit a agency person I get the following error:

2017-12-13T18:26:28.500268374Z app[web.1]:   Rendered agency_people/_form.html.haml (46.1ms)
2017-12-13T18:26:28.500281174Z app[web.1]:   Rendered agency_people/edit.html.haml within layouts/application (46.7ms)
2017-12-13T18:26:28.500431979Z app[web.1]: Completed 500 Internal Server Error in 65ms (ActiveRecord: 6.7ms)
2017-12-13T18:26:28.512012161Z app[web.1]:
2017-12-13T18:26:28.512024562Z app[web.1]: ActionView::Template::Error (comparison of JobSeeker with JobSeeker failed):
2017-12-13T18:26:28.512028062Z app[web.1]:     50:                 title: "Must have 'Job Developer' role"}
2017-12-13T18:26:28.512030862Z app[web.1]:     51:       .col-sm-12.panel.pre-scrollable.panel-default
2017-12-13T18:26:28.512033362Z app[web.1]:     52:         .panel-body.input-panel-body
2017-12-13T18:26:28.512035862Z app[web.1]:     53:           = person_form.collection_check_boxes(:as_jd_job_seeker_ids,
2017-12-13T18:26:28.512038362Z app[web.1]:     54:                 job_seekers_assigned_or_assignable_to_ap(agency_person, :JD),
2017-12-13T18:26:28.512040962Z app[web.1]:     55:                                               :id, :full_name) do |box|
2017-12-13T18:26:28.512043362Z app[web.1]:     56:             = box.label(class: 'checkbox col-sm-12 normal-label') do
2017-12-13T18:26:28.512045962Z app[web.1]:   app/helpers/agency_people_helper.rb:33:in `sort'
2017-12-13T18:26:28.512048362Z app[web.1]:   app/helpers/agency_people_helper.rb:33:in `job_seekers_assigned_or_assignable_to_ap'
2017-12-13T18:26:28.512050962Z app[web.1]:   app/views/agency_people/_form.html.haml:53:in `block in _app_views_agency_people__form_html_haml___2269250686239051713_46978165068540'
2017-12-13T18:26:28.512053663Z app[web.1]:   app/views/agency_people/_form.html.haml:1:in `_app_views_agency_people__form_html_haml___2269250686239051713_46978165068540'
2017-12-13T18:26:28.512062563Z app[web.1]:   app/views/agency_people/edit.html.haml:4:in `_app_views_agency_people_edit_html_haml___4326928033598296124_46978156571720'
2017-12-13T18:26:28.512065563Z app[web.1]:
2017-12-13T18:26:28.512067963Z app[web.1]:
patmbolger commented 6 years ago

I can look at this later today.

patmbolger@gmail.com Cell: (774) 217-4441 Skype: patmbolger Linkedin

On Dec 13, 2017, at 1:28 PM, João Pereira notifications@github.com wrote:

When I login as agency admin and try to edit a agency person I get the following error:

2017-12-13T18:26:28.500268374Z app[web.1]: Rendered agency_people/_form.html.haml (46.1ms) 2017-12-13T18:26:28.500281174Z app[web.1]: Rendered agency_people/edit.html.haml within layouts/application (46.7ms) 2017-12-13T18:26:28.500431979Z app[web.1]: Completed 500 Internal Server Error in 65ms (ActiveRecord: 6.7ms) 2017-12-13T18:26:28.512012161Z app[web.1]: 2017-12-13T18:26:28.512024562Z app[web.1]: ActionView::Template::Error (comparison of JobSeeker with JobSeeker failed): 2017-12-13T18:26:28.512028062Z app[web.1]: 50: title: "Must have 'Job Developer' role"} 2017-12-13T18:26:28.512030862Z app[web.1]: 51: .col-sm-12.panel.pre-scrollable.panel-default 2017-12-13T18:26:28.512033362Z app[web.1]: 52: .panel-body.input-panel-body 2017-12-13T18:26:28.512035862Z app[web.1]: 53: = person_form.collection_check_boxes(:as_jd_job_seeker_ids, 2017-12-13T18:26:28.512038362Z app[web.1]: 54: job_seekers_assigned_or_assignable_to_ap(agency_person, :JD), 2017-12-13T18:26:28.512040962Z app[web.1]: 55: :id, :full_name) do |box| 2017-12-13T18:26:28.512043362Z app[web.1]: 56: = box.label(class: 'checkbox col-sm-12 normal-label') do 2017-12-13T18:26:28.512045962Z app[web.1]: app/helpers/agency_people_helper.rb:33:in sort' 2017-12-13T18:26:28.512048362Z app[web.1]: app/helpers/agency_people_helper.rb:33:injob_seekers_assigned_or_assignable_to_ap' 2017-12-13T18:26:28.512050962Z app[web.1]: app/views/agency_people/_form.html.haml:53:in block in _app_views_agency_people__form_html_haml___2269250686239051713_46978165068540' 2017-12-13T18:26:28.512053663Z app[web.1]: app/views/agency_people/_form.html.haml:1:in_app_views_agency_people__form_html_haml_2269250686239051713_46978165068540' 2017-12-13T18:26:28.512062563Z app[web.1]: app/views/agency_people/edit.html.haml:4:in `_app_views_agency_people_edit_htmlhaml4326928033598296124_46978156571720' 2017-12-13T18:26:28.512065563Z app[web.1]: 2017-12-13T18:26:28.512067963Z app[web.1]:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AgileVentures/MetPlus_tracker/issues/687, or mute the thread https://github.com/notifications/unsubscribe-auth/AJgaVWWzneyUuLoodnNaoKoRbj2c4XVAks5tABdkgaJpZM4RA--e.

joaopapereira commented 6 years ago

As mentioned to me by @patmbolger there was aJobSeeker in the table that did not existed as a User, so there was an error while displaying JobSeekers.

I corrected that by entering the database to remove the entry that shouldn't be there