Commit Graph

4 Commits

Author SHA1 Message Date
Trenton H
19d930a81a feat: update conditionals.py to use resolve_requested_version and DocumentVersion
- 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>
2026-04-14 08:05:34 -07:00
Trenton H
f18b56ed8a test: rewrite test_api_document_versions for DocumentVersion model
- 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>
2026-04-13 21:07:28 -07:00
Trenton H
aed9abe48c Feature: Replace Whoosh with tantivy search backend (#12471)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Antoine Mérino <3023499+Merinorus@users.noreply.github.com>
2026-04-02 12:38:22 -07:00
shamoon
ceee769e26 Feature: document file versions (#12061) 2026-02-26 16:46:54 +00:00