Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Oct 24, 2020
1 parent 4b22095 commit a7c2e6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cvat/apps/authentication/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def has_object_permission(self, request, view, obj):
class JobAccessPermission(BasePermission):
# pylint: disable=no-self-use
def has_object_permission(self, request, view, obj):
return request.user.has_perm('engine.job.access"', obj)
return request.user.has_perm('engine.job.access', obj)

class JobChangePermission(BasePermission):
# pylint: disable=no-self-use
Expand Down
5 changes: 5 additions & 0 deletions cvat/apps/engine/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,11 @@ def to_representation(self, instance):
}

class IssueSerializer(serializers.ModelSerializer):
roi = serializers.ListField(
child=serializers.FloatField(),
allow_empty=False,
)

class Meta:
model = models.Issue
fields = '__all__'
Expand Down
1 change: 1 addition & 0 deletions cvat/apps/engine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ def get_permissions(self):

return [perm() for perm in permissions]


@method_decorator(name='destroy', decorator=swagger_auto_schema(operation_summary='Method removes an issue from a job'))
class IssueViewSet(viewsets.GenericViewSet, mixins.DestroyModelMixin):
queryset = Issue.objects.all().order_by('id')
Expand Down

0 comments on commit a7c2e6a

Please sign in to comment.