Page MenuHomePhabricator

/topics/finance/ says unsupported operand type(s) for +=: 'decimal.Decimal' and 'float'
Closed, ResolvedPublic

Description

Problem

/topics/finance/ throws an internal error. Details about the error, such as error message and traceback can be found in Phabricator or by running your own development Tracker instance.
 

Proposed solution

Find out why the error is happening, and fix it by sending a patch for wikimedia-cz/tracker repository, hosted at Wikimedia Gerrit. When claiming task on GCI website, please claim the respective Phabricator task as well.
 

Materials

 

Details

Message
TypeError at /topics/finance/
unsupported operand type(s) for +=: 'decimal.Decimal' and 'float'
Traceback
Traceback (most recent call last):
  File "/var/www/tracker.wikimedia.cz/deploy/pyenv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/www/tracker.wikimedia.cz/deploy/pyenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/www/tracker.wikimedia.cz/deploy/pyenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "./tracker/views.py", line 899, in topic_finance
    grant_finance.add_finance(topic_finance)
  File "./tracker/models.py", line 704, in add_finance
    self.unpaid += other.unpaid