- Replace resolve_effective_document_by_pk stub with direct get_object_or_404
+ resolve_requested_version calls in all five conditional functions
- Switch from .modified (shim) to .added (DocumentVersion native field)
- Switch thumbnail cache key to use version.id instead of document id
- Re-add get_root_document/get_latest_version_for_root stubs to versioning.py
(bulk_edit.py still needs them; Task 10 will remove them)
- Update TestVersionAwareFilters tests to reflect simplified filter behavior
(no more FieldError fallback; filters query content directly)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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>