arkhitech / redmine_leaves

A simple plugin for user leaves management. It allows user to check-in and check-out for attendance marking. Leave is marked for any user that does not check-in by the specified time. Administrator can define leave types via the administrative interface for the plugin
MIT License
15 stars 6 forks source link

open [user time reports ] occur 500 error #73

Open archonwang opened 7 years ago

archonwang commented 7 years ago

open [user time reports ] occur 500 error @arkhitech

error log

Started GET "/user_time_checks/user_time_reporting" for 192.168.20.231 at 2017-03-28 05:10:10 +0000
Processing by UserTimeChecksController#user_time_reporting as */*
  Current user: admin (id=1)
  Rendered plugins/redmine_leaves/app/views/layouts/user_time_reports.html.erb (2.0ms)
  Rendered plugins/redmine_leaves/app/views/user_time_checks/_time_report_grid.html.erb (172.8ms)
  Rendered plugins/redmine_leaves/app/views/user_time_checks/user_time_reporting.erb within layouts/base (177.9ms)
Completed 500 Internal Server Error in 188ms (ActiveRecord: 3.6ms)

ActionView::Template::Error (undefined method `num_pages' for #<ActiveRecord::Relation []>):
    1: 
    2: <%=define_grid @time_report_grid, hide_submit_button: true, hide_reset_button: true, hide_csv_button: false do |e|
    3: 
    4:   #e.column name: l(:field_user_id), html: {style: 'text-align: center'}, 
    5:   #:attribute => 'user_id',#model:'User',