Exemple #1
0
 def perform_create(self, serializer):
     organization = serializer.save()
     member = OrganizationMember(organization=organization, user=self.request.user)
     member.save()
Exemple #2
0
 def post_save(self, obj, created=False):
     if created:
         member = OrganizationMember(organization=obj,
                                     user=self.request.user)
         member.save()
Exemple #3
0
 def perform_create(self, serializer):
     organization = serializer.save()
     member = OrganizationMember(organization=organization,
                                 user=self.request.user)
     member.save()