Fix traceback when rendering a note when repo is invalid