Phase 1a: Template endpoint QA nits

phase-2026-03-09-1a-template-nits Phase

completed phase

Phase 1a: Template endpoint QA nits

Goal: Fix two QA findings from PR #131 before merge
Owner: Dev agent
Repo: forgejo_admin/pal-e-docs
Depends on: Phase 1 (PR #131 open, fixes pushed to same branch)

Problem

QA review of PR #131 found two issues that should be fixed before merge:

Fix

  • Missing is_public and revised_by fields on FromTemplateRequest — The schema hardcodes is_public=True and revised_by=None without exposing them to callers. This means no client can create a private template-rendered note or record authorship. Add both fields with defaults matching NoteCreate, and wire them through to the note creation in the endpoint.
  • Non-idiomatic pytest.raises usage — Tests use manual try/except with assert False fallback instead of pytest.raises context manager. This obscures intent, gives worse failure messages, and doesn't match the project's test style. Replace all instances.
  • plan-2026-03-09-template-rendering — parent plan
  • Forgejo issue: forgejo_admin/pal-e-docs #132