Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9bad375e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.get_user_events, | ||
| lambda data: data.auditEvents if data and data.auditEvents else [], | ||
| aid = aid, use_all_permitted_aids = use_all_permitted_aids, window = window, start_date = start_date, end_date = end_date, cursor = cursor, |
There was a problem hiding this comment.
Read audit_events field, not alias, in pagination lambda
The new get_user_events_paginated lambda uses data.auditEvents, but AuditUserEvents defines the field as audit_events with alias auditEvents (see administrative/models/audit_user_events.py). Pydantic v2 doesn’t create attributes for aliases, so any successful response will raise AttributeError when the iterator evaluates this lambda, breaking pagination for all callers of get_user_events_paginated. Access data.audit_events instead.
Useful? React with 👍 / 👎.
No description provided.