# What this PR does See #2173 Also, closes #2187 . All of the new files under `type_stubs/icalendar` were autogenerated by running: ```bash stubgen -p icalendar -o type_stubs ``` ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required)
24 lines
534 B
Python
24 lines
534 B
Python
from rest_framework import serializers
|
|
|
|
from apps.user_management.models import Team
|
|
|
|
|
|
class TeamSerializer(serializers.ModelSerializer):
|
|
id = serializers.CharField(read_only=True, source="public_primary_key")
|
|
|
|
class Meta:
|
|
model = Team
|
|
fields = (
|
|
"id",
|
|
"name",
|
|
"email",
|
|
"avatar_url",
|
|
"is_sharing_resources_to_all",
|
|
)
|
|
|
|
read_only_fields = [
|
|
"id",
|
|
"name",
|
|
"email",
|
|
"avatar_url",
|
|
]
|