Skip to content

Commit

Permalink
Resolved NaN issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzyczaK committed Dec 11, 2010
1 parent 4f00fb1 commit f4fea53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/work_records_controller.rb
Expand Up @@ -43,7 +43,7 @@ def index

@accord_sum = @work_records.inject(0.0) {|sum, wr| sum += wr.accord_all_groups }
@all_work_time_sum = @work_records.inject(0.0) {|sum, wr| sum += wr.all_work_time }
@productivity_sum = @accord_sum/@all_work_time_sum
@productivity_sum = @all_work_time_sum > 0 ? @accord_sum/@all_work_time_sum : 0.0

store_target_location
provide_print_version_if_requested
Expand Down

0 comments on commit f4fea53

Please sign in to comment.