~sircmpwn/git.sr.ht#340: 
500 on blame of files within git modules

Should be a 404 instead. Reproduces both on my git.sr.ht instance and the hosted instance. Traceback from my instance:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python3.8/site-packages/gitsrht/blueprints/repo.py", line 319, in blame
    orig_commit, ref, path, blob, entry = resolve_blob(git_repo, ref, path)
  File "/usr/lib/python3.8/site-packages/gitsrht/blueprints/repo.py", line 277, in resolve_blob
    if part not in tree:
TypeError: argument of type 'NoneType' is not iterable
Status
REPORTED
Submitter
~ecs
Assigned to
No-one
Submitted
1 year, 2 months ago
Updated
1 year, 2 months ago
Labels
No labels applied.