Skip to content

🐛(models) fix groups' optional member field defaulting to null#630

Merged
MYilFun00 merged 2 commits into
openfun:mainfrom
piptouque:fix_group_optional_member
Jul 6, 2026
Merged

🐛(models) fix groups' optional member field defaulting to null#630
MYilFun00 merged 2 commits into
openfun:mainfrom
piptouque:fix_group_optional_member

Conversation

@piptouque

@piptouque piptouque commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Purpose

The member field is optional in an Identified Group
Without this fix, the mbox, mbox_sha1sum etc. kinds of groups still expect a member.

Proposal

The member field of BaseXxapiIdentifiedGroup did not have a default value even though it is Optional.
This commit sets it to None, which is in line with other optional fields.

  • Added above fix
  • Added tests
  • Updated CHANGELOG.md

Without this fix, the mbox, mbox_sha1sum etc.
kinds of groups still expect a member.
@piptouque piptouque force-pushed the fix_group_optional_member branch from af72d15 to f58fbd6 Compare June 15, 2026 09:10
Reconcile with main (openfun#632, openfun#634, openfun#635) and resolve CHANGELOG conflict.
@MYilFun00 MYilFun00 force-pushed the fix_group_optional_member branch from 2739f19 to e811f6f Compare July 6, 2026 12:30

@MYilFun00 MYilFun00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐛(models) fix groups' optional member field defaulting to null (#630)

Add = None default on BaseXapiIdentifiedGroup.member so Pydantic v2
treats the field as truly optional per the xAPI spec. Without it, valid
Identified Groups without member were rejected with a 422.

@MYilFun00 MYilFun00 merged commit 62d7d4d into openfun:main Jul 6, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants