Skip to content
Snippets Groups Projects

Resolve "Cannot edit users details"

Merged Agate requested to merge 869-username-chars into master
1 unresolved thread
4 files
+ 10
2
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -44,12 +44,14 @@ class ManageUserSimpleSerializer(serializers.ModelSerializer):
class ManageUserSerializer(serializers.ModelSerializer):
permissions = PermissionsSerializer(source="*")
upload_quota = serializers.IntegerField(allow_null=True)
actor = serializers.SerializerMethodField()
Please register or sign in to reply
class Meta:
model = users_models.User
fields = (
"id",
"username",
"actor",
"email",
"name",
"is_active",
@@ -82,6 +84,10 @@ class ManageUserSerializer(serializers.ModelSerializer):
)
return instance
def get_actor(self, obj):
if obj.actor:
return ManageBaseActorSerializer(obj.actor).data
class ManageInvitationSerializer(serializers.ModelSerializer):
users = ManageUserSimpleSerializer(many=True, required=False)
Loading