Commit Graph

4 Commits

Author SHA1 Message Date
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
1139e7f59b feat: rewrite versioning.py to operate on DocumentVersion
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>
2026-04-13 14:28:18 -07:00
Trenton H
1e21bcd26e Breaking: Drop support for Python 3.10 (#12234) 2026-03-04 15:03:33 -08:00
shamoon
ceee769e26 Feature: document file versions (#12061) 2026-02-26 16:46:54 +00:00