Skip to content

Commit

Permalink
Fix invalid comarision in serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Jul 9, 2019
1 parent 42324b7 commit 5b38249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion awx/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ def get_field_from_model_or_attrs(fd):
organization = self.instance.organization

if 'allow_override' in attrs and self.instance:
if attrs['allow_override'] != self.instance:
if attrs['allow_override'] != self.instance.allow_override:
raise serializers.ValidationError({
'allow_override': _('Branch override behavior of a project cannot be changed after creation.')})

Expand Down

0 comments on commit 5b38249

Please sign in to comment.