Skip to content

Commit

Permalink
Bill check report run: Show truncation limit
Browse files Browse the repository at this point in the history
  • Loading branch information
tlocke committed Aug 15, 2024
1 parent 1de7c4c commit 33b1798
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chellow/templates/report_run_bill_check.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<td>{{run.creator}}</td>
<td>{{run.title}}</td>
<td>{{run.state}}</td>
<td>{{rows|length}}</td>
<td>{{rows|length}} (truncated at {{ROW_LIMIT}})</td>
<td>
{% if 'sum_difference' in summary %}
{{"%.2f"|format(summary.sum_difference)}}</td>
Expand Down
5 changes: 3 additions & 2 deletions chellow/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,12 +1341,12 @@ def report_run_get(run_id):
q = q.filter(
ReportRunRow.data["properties"]["is_checked"].as_boolean() == false()
)

ROW_LIMIT = 200
rows = (
q.order_by(
func.abs(ReportRunRow.data["values"][order_by].as_float()).desc()
)
.limit(200)
.limit(ROW_LIMIT)
.all()
)
return render_template(
Expand All @@ -1357,6 +1357,7 @@ def report_run_get(run_id):
elements=elements,
element=element,
hide_checked=hide_checked,
ROW_LIMIT=ROW_LIMIT,
)

elif run.name == "asset_comparison":
Expand Down

0 comments on commit 33b1798

Please sign in to comment.