diff --git a/CHANGELOG.md b/CHANGELOG.md index f6469ca277ea..da0882516ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - New shape is added when press ``esc`` when drawing instead of cancellation +- Fixed `FileNotFoundError` during dump after moving format files ### Security - diff --git a/cvat/apps/annotation/serializers.py b/cvat/apps/annotation/serializers.py index 8fa8b3455303..7284c0414a00 100644 --- a/cvat/apps/annotation/serializers.py +++ b/cvat/apps/annotation/serializers.py @@ -1,8 +1,10 @@ -# Copyright (C) 2018 Intel Corporation +# Copyright (C) 2018-2020 Intel Corporation # # SPDX-License-Identifier: MIT +from django.utils import timezone from rest_framework import serializers + from cvat.apps.annotation import models class AnnotationDumperSerializer(serializers.ModelSerializer): @@ -57,6 +59,9 @@ def create(self, validated_data): def update(self, instance, validated_data): dumper_names = [handler["display_name"] for handler in validated_data["annotationdumper_set"]] loader_names = [handler["display_name"] for handler in validated_data["annotationloader_set"]] + instance.handler_file = validated_data.get('handler_file', instance.handler_file) + instance.owner = validated_data.get('owner', instance.owner) + instance.updated_date = timezone.localtime(timezone.now()) handlers_to_delete = [d for d in instance.annotationdumper_set.all() if d.display_name not in dumper_names] + \ [l for l in instance.annotationloader_set.all() if l.display_name not in loader_names]