diff --git a/routers/links.py b/routers/links.py index e9069bb..47abc1b 100644 --- a/routers/links.py +++ b/routers/links.py @@ -99,11 +99,13 @@ async def create_link( VALUES (:fid, :lid) ON CONFLICT DO NOTHING """), {"fid": default_fid, "lid": link["id"]}) - # Redirect back to context if created from task/meeting + # Redirect back to context if created from task/meeting/project if task_id and task_id.strip(): return RedirectResponse(url=f"/tasks/{task_id}?tab=links", status_code=303) if meeting_id and meeting_id.strip(): return RedirectResponse(url=f"/meetings/{meeting_id}?tab=links", status_code=303) + if project_id and project_id.strip(): + return RedirectResponse(url=f"/projects/{project_id}?tab=links", status_code=303) return RedirectResponse(url="/links", status_code=303) diff --git a/templates/link_form.html b/templates/link_form.html index 753207f..ffb328b 100644 --- a/templates/link_form.html +++ b/templates/link_form.html @@ -15,7 +15,7 @@
{% if prefill_task_id is defined and prefill_task_id %}{% endif %} {% if prefill_meeting_id is defined and prefill_meeting_id %}{% endif %} - + {% endblock %}