Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Nov 16, 2020
1 parent 162caec commit ac20ab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/mappings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def update(self, request, *args, **kwargs):
self.object = self.get_object()
self.parent_resource = self.object.parent

if self.parent_resource != self.parent_resource.head:
if not self.parent_resource.is_head:
return Response(
{'non_field_errors': PARENT_VERSION_NOT_LATEST_CANNOT_UPDATE_MAPPING},
status=status.HTTP_400_BAD_REQUEST
Expand Down

0 comments on commit ac20ab0

Please sign in to comment.