Phase 1a: Template endpoint QA nits
Phase 1a: Template endpoint QA nits
Goal: Fix two QA findings from PR #131 before merge
Owner: Dev agent
Repo:
forgejo_admin/pal-e-docsDepends 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_publicandrevised_byfields onFromTemplateRequest— The schema hardcodesis_public=Trueandrevised_by=Nonewithout exposing them to callers. This means no client can create a private template-rendered note or record authorship. Add both fields with defaults matchingNoteCreate, and wire them through to the note creation in the endpoint. - Non-idiomatic
pytest.raisesusage — Tests use manual try/except withassert Falsefallback instead ofpytest.raisescontext manager. This obscures intent, gives worse failure messages, and doesn't match the project's test style. Replace all instances.
Related
plan-2026-03-09-template-rendering— parent plan- Forgejo issue:
forgejo_admin/pal-e-docs #132