Skip to content

Commit

Permalink
Expose organization user created timestamp in members endpoint (#5329)
Browse files Browse the repository at this point in the history
### 📣 Summary
Expose organization user created timestamp instead of `date_joined` in
members endpoint.



### 📖 Description
The created timestamp for organization users is now exposed in the
members endpoint, providing a clear indication of when each user was
added to the organization. This timestamp is formatted as
`%Y-%m-%dT%H:%M:%SZ`.
  • Loading branch information
rajpatel24 authored Dec 10, 2024
1 parent f4dc7d2 commit 8c6bd66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kobo/apps/organizations/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OrganizationUserSerializer(serializers.ModelSerializer):
)
url = serializers.SerializerMethodField()
date_joined = serializers.DateTimeField(
source='user.date_joined', format='%Y-%m-%dT%H:%M:%SZ'
source='created', format='%Y-%m-%dT%H:%M:%SZ'
)
user__username = serializers.ReadOnlyField(source='user.username')
user__extra_details__name = serializers.ReadOnlyField(
Expand Down

0 comments on commit 8c6bd66

Please sign in to comment.