mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
testes and fixes for space, userspace and invitelink apis
This commit is contained in:
@@ -200,7 +200,7 @@ class UserSpaceSerializer(WritableNestedModelSerializer):
|
||||
groups = GroupSerializer(many=True)
|
||||
|
||||
def validate(self, data):
|
||||
if self.instance.user == self.context['request'].space.created_by: # cant change space owner permission
|
||||
if self.instance.user == self.context['request'].space.created_by: # can't change space owner permission
|
||||
raise serializers.ValidationError(_('Cannot modify Space owner permission.'))
|
||||
return super().validate(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user