Skip to content
Snippets Groups Projects
Commit b597a420 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Update UserSerializer: get user creating or updating from context.

parent 8376f31c
No related branches found
No related tags found
No related merge requests found
......@@ -116,6 +116,7 @@ class UserSerializer(serializers.ModelSerializer):
user=user,
cba_username=profile_data.get("cba_username").strip(),
cba_user_token=profile_data.get("cba_user_token").strip(),
created_by=self.context["user"],
)
profile.save()
......@@ -148,6 +149,7 @@ class UserSerializer(serializers.ModelSerializer):
profile.cba_username = profile_data.get("cba_username")
profile.cba_user_token = profile_data.get("cba_user_token")
profile.updated_by = self.context["user"]
profile.save()
instance.save()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment