- Replace Document-as-version pattern with DocumentVersion objects
- Add _create_doc and _create_version helpers; remove _create_pdf
- Remove deleted root/ endpoint tests
- Fix views.py: use isinstance(content_doc, DocumentVersion) instead
of id comparison (cross-table id collision), add Document.content
sync when latest version content is edited
- Add compatibility stubs to versioning.py (get_root_document,
get_latest_version_for_root, resolve_effective_document_by_pk,
EffectiveDocumentResolution) so bulk_edit.py and conditionals.py
imports resolve; Tasks 9 and 10 will refactor the callers
- Add DocumentVersion.modified property shim for conditionals.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the old root_document FK navigation with DocumentVersion
queryset lookups. Add DocumentVersionFactory to factories.py.
Rewrite test_version_conditionals.py to test the new API using
pytest style with factories.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>