copilot-swe-agent[bot]
|
e9d64e6aac
|
refactor: Apply code review improvements to AI suggestions API
- Remove unused imports (Document from serializers, override_settings from tests)
- Add explanatory comments to all empty except clauses
- Create SUGGESTION_TYPE_CHOICES constant and SuggestionSerializerMixin for DRY
- Implement type-specific validation (value_id for ID types, value_text for text types)
- Remove redundant Document.DoesNotExist handler (already handled by DRF)
- Optimize ai_suggestion_stats query (21 queries → 3 queries using aggregation)
- Update documentation to clarify unsupported custom_field/workflow in apply endpoint
Addresses all 14 code review comments from Copilot PR reviewer.
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
|
2025-11-13 08:22:57 +00:00 |
|