We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cab35b0 commit 707a22aCopy full SHA for 707a22a
ansible_base/rbac/api/serializers.py
@@ -125,7 +125,8 @@ def validate(self, attrs):
125
has_actor_in_request = self.actor_field in self.initial_data
126
has_actor_aid_in_request = actor_aid_field in self.initial_data
127
128
- if (has_actor_in_request and has_actor_aid_in_request) or (not has_actor_in_request and not has_actor_aid_in_request):
+ # If both actor and actor_ansible_id are present or both not present than we error out
129
+ if has_actor_in_request == has_actor_aid_in_request:
130
self.raise_id_fields_error(self.actor_field, actor_aid_field)
131
132
return super().validate(attrs)
0 commit comments