From b6c37ec44ff76def0bbb138cf2dfd1ab33f47012 Mon Sep 17 00:00:00 2001 From: DmitriyOparin <35344996+DmitriyOparin@users.noreply.github.com> Date: Thu, 25 Feb 2021 14:53:25 +0300 Subject: [PATCH] Fixed of receiving 'function' variable (#2860) * fixed of receiving function variable * change CHANGELOG.md Co-authored-by: Dmitriy Oparin --- CHANGELOG.md | 2 ++ cvat/apps/lambda_manager/views.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64acc336d..3e4b8bcd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ### Fixed + - More robust execution of nuclio GPU functions by limiting the GPU memory consumption per worker () - Kibana startup initialization () - The cursor jumps to the end of the line when renaming a task () @@ -52,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed cuboid perpective change () - Annotation page popups (ai tools, drawing) reset state after detecting, tracking, drawing () - Polygon editing using trailing point () +- Fixed of receiving function variable () ### Security diff --git a/cvat/apps/lambda_manager/views.py b/cvat/apps/lambda_manager/views.py index dde894c51..079d57894 100644 --- a/cvat/apps/lambda_manager/views.py +++ b/cvat/apps/lambda_manager/views.py @@ -605,7 +605,7 @@ class RequestViewSet(viewsets.ViewSet): self.check_object_permissions(self.request, db_task) except (KeyError, ObjectDoesNotExist) as err: raise ValidationError( - '`{}` lambda function was run '.format(function) + + '`{}` lambda function was run '.format(request.data.get('function', 'undefined')) + 'with wrong arguments ({})'.format(str(err)), code=status.HTTP_400_BAD_REQUEST) -- GitLab