Skip to content

Commit

Permalink
Turns out the previous commit did fix a bug that could arise and produce
Browse files Browse the repository at this point in the history
the same error as described by Issue #22, but in fact Issue #22 is down
to a database compatibility issue with SQLite 3. Hopefully fixed by this
change.
  • Loading branch information
pond committed Sep 9, 2013
1 parent 9466a7c commit cf1cb1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/track_record_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,14 @@ def run_sums_for_range( range, override_key = nil )
task_id_str, user_id_str, flag_str, *date_based_key = key
end

# Some databases return grouped data with integer IDs (e.g.
# sqlite) and Rails doesn't do anything about it; make sure
# IDs are coerced to strings (we don't coerce to numbers as
# some databases might not use purely numeric IDs).

task_id_str = task_id_str.to_s
user_id_str = user_id_str.to_s

# The current row's overall total and its per-user breakdown.
# In a standard task report, this would appear on the right of
# each row.
Expand Down

0 comments on commit cf1cb1e

Please sign in to comment.