Repository navigation
Conversation
types="MEMBER_ADDED" or types=UserGroupAuditEventType.MEMBER_ADDED was iterated one character at a time and failed with "'M' is not a valid UserGroupAuditEventType". Wrap a single string in a list, as the performance helpers already do for their types filter.
Mohith26
requested review from
Gabefire,
KahvehS,
cyrusj89,
ikerr,
labelbox-engineering,
manuaero and
ramy1951
November 3, 2026 05:18
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
UserGroup.audit_events(types=...)andUserGroup.get_audit_events(client, types=...)take an iterable of event types. Passing a single type, either"MEMBER_ADDED"orUserGroupAuditEventType.MEMBER_ADDED(astrenum), gets iterated one character at a time and fails before any request with:This wraps a single string in a list, the same way
_to_event_typesand_to_idsinschema/performance.pyalready handle a single value. Lists behave exactly as before. Thetypesdocstring onget_audit_eventsnow says a single type is accepted.Type of change
All Submissions
Changes to Core Features
Testing: added
test_accepts_a_single_type(string and enum member) totests/unit/schema/test_user_group_members_audit.py; both cases fail ondevelopand pass with this change.pytest tests/unitpasses (502),ruff format --checkis clean, and mypy reports no issues inuser_group_audit.py.Note
Low Risk
Localized SDK filter normalization with no auth or data-path changes; behavior for list inputs is unchanged.
Overview
Fixes a bug where passing one event type to
UserGroup.audit_events/get_user_group_audit_events(e.g.types="MEMBER_ADDED"or aUserGroupAuditEventTypemember) was treated as an iterable of characters and failed withValueErrorbefore any API call.get_user_group_audit_eventsnow wraps a lonestrin a list before building the GraphQLwhere.typesfilter; lists of types behave as before. Thetypesdocstring onUserGroup.get_audit_eventsdocuments that a single type is allowed. Unit coverage addstest_accepts_a_single_typefor string and enum inputs.Reviewed by Cursor Bugbot for commit deb04be. Bugbot is set up for automated code reviews on this repo. Configure here.