datamade / bga-payroll

💰 How much do your public officials make?
4 stars 4 forks source link

TypeError: conversion from DebugUndefined to Decimal is not supported #461

Closed sentry-io[bot] closed 4 years ago

sentry-io[bot] commented 4 years ago

Sentry Issue: BGA-PAYROLL-DATABASE-BW

TypeError: conversion from DebugUndefined to Decimal is not supported
(9 additional frame(s) were not displayed)
...
  File "templates/jinja2/search_results.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "templates/jinja2/base.html", line 85, in top-level template code
    {% block content %}{% endblock %}
  File "templates/jinja2/search_results.html", line 84, in block "content"
    {% include 'partials/search_result.html' %}
  File "templates/jinja2/partials/search_result.html", line 11, in top-level template code
    <strong>Salary:</strong> {{ result.salary_d|format_salary }}
  File "payroll/utils.py", line 27, in format_salary
    rounded_i = Decimal(i).quantize(0, ROUND_HALF_UP)
hancush commented 4 years ago

Dupe of #460.