chore: add project lead as project member (#1627)

* chore: add project lead as project member

* fix: project member lead create
This commit is contained in:
Nikhil 2023-07-24 12:09:32 +05:30 committed by GitHub
parent 73b38f4db9
commit 8e70a036b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,6 +156,13 @@ class ProjectViewSet(BaseViewSet):
project_id=serializer.data["id"], member=request.user, role=20 project_id=serializer.data["id"], member=request.user, role=20
) )
if serializer.data["project_lead"] is not None:
ProjectMember.objects.create(
project_id=serializer.data["id"],
member_id=serializer.data["project_lead"],
role=20,
)
# Default states # Default states
states = [ states = [
{ {