ArchiveTeam/terroroftinytown

NameError: name 'project_stats' is not defined

Opened this issue · 0 comments

chfoo commented

As reported on IRC, adding a IDN as a new project in the tracker causes an exception.

Tracker running on 1f5e121

2019-04-16 01:23:05,984 - tornado.application - ERROR - Uncaught exception POST /projects/overview?action=add_project ([snipped])
HTTPServerRequest(protocol='https', host='tracker.archiveteam.org:1338', method='POST', uri='/projects/overview?action=add_project', version='HTTP/1.1', remote_ip='[snipped]', headers=[snipped])
Traceback (most recent call last):
  File "/home/tinytown/.local/lib/python3.4/site-packages/tornado/web.py", line 1443, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/home/tinytown/.local/lib/python3.4/site-packages/tornado/web.py", line 2800, in wrapper
    return method(self, *args, **kwargs)
  File "/home/tinytown/terroroftinytown/terroroftinytown/tracker/project.py", line 63, in post
    project_budgets=Budget.projects,
  File "/home/tinytown/.local/lib/python3.4/site-packages/tornado/web.py", line 699, in render
    html = self.render_string(template_name, **kwargs)
  File "/home/tinytown/.local/lib/python3.4/site-packages/tornado/web.py", line 806, in render_string
    return t.generate(**namespace)
  File "/home/tinytown/.local/lib/python3.4/site-packages/tornado/template.py", line 345, in generate
    return execute()
  File "admin/project/all_html.generated.py", line 180, in _tt_execute
    _tt_tmp = project_stats.get(project['name'], 'xy')[0]  # admin/project/all.html:55 (via admin/base.html:28, base.html:13)
NameError: name 'project_stats' is not defined