find_for_other: fail early when no project is given

This commit is contained in:
Sybren A. Stüvel 2017-09-14 12:08:32 +02:00
parent e09649586f
commit 8cb506731f

View File

@ -83,6 +83,9 @@ def find_for_other(project, node):
Hard-coded fallback, so doesn't need @register_node_finder() decoration.
"""
if not project:
raise ValueError(f'project={project}')
the_project = project_url(project['_id'], project=project)
return url_for('projects.view_node',