diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cf408adabb5..85648ec3e99a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## \[2.4.9] - 2023-06-22 +### Fixed +- Error related to calling serverless functions on some image formats () + ## \[2.4.8] - 2023-06-22 ### Fixed - Getting original chunks for items in specific cases () diff --git a/cvat/apps/engine/migrations/0072_alter_issue_updated_date.py b/cvat/apps/engine/migrations/0072_alter_issue_updated_date.py new file mode 100644 index 000000000000..4c549be10aa5 --- /dev/null +++ b/cvat/apps/engine/migrations/0072_alter_issue_updated_date.py @@ -0,0 +1,28 @@ +# Generated by Django 4.2.1 on 2023-06-23 19:26 + +from django.db import migrations, models + +def forwards_func(apps, schema_editor): + Issue = apps.get_model("engine", "Issue") + + issues = Issue.objects.all() + for issue in issues: + issue.updated_date = issue.created_date + + Issue.objects.bulk_update(issues, fields=['updated_date'], batch_size=500) + +class Migration(migrations.Migration): + dependencies = [ + ("engine", "0071_annotationguide_asset"), + ] + + operations = [ + migrations.RunPython( + code=forwards_func, + ), + migrations.AlterField( + model_name="issue", + name="updated_date", + field=models.DateTimeField(auto_now=True), + ), + ] diff --git a/cvat/apps/engine/models.py b/cvat/apps/engine/models.py index fd2dfe83c36f..7eca306f3d2a 100644 --- a/cvat/apps/engine/models.py +++ b/cvat/apps/engine/models.py @@ -914,7 +914,7 @@ class Issue(models.Model): assignee = models.ForeignKey(User, null=True, blank=True, related_name='+', on_delete=models.SET_NULL) created_date = models.DateTimeField(auto_now_add=True) - updated_date = models.DateTimeField(null=True, blank=True) + updated_date = models.DateTimeField(auto_now=True) resolved = models.BooleanField(default=False) def get_project_id(self): diff --git a/tests/python/shared/assets/cvat_db/data.json b/tests/python/shared/assets/cvat_db/data.json index 2613dacdc831..b33aad592e9c 100644 --- a/tests/python/shared/assets/cvat_db/data.json +++ b/tests/python/shared/assets/cvat_db/data.json @@ -9660,7 +9660,7 @@ ], "assignee": null, "created_date": "2022-03-16T11:04:39.444Z", - "updated_date": null, + "updated_date": "2022-03-16T11:04:39.444Z", "resolved": true } }, @@ -9676,7 +9676,7 @@ ], "assignee": null, "created_date": "2022-03-16T11:07:22.170Z", - "updated_date": null, + "updated_date": "2022-03-16T11:07:22.170Z", "resolved": false } }, @@ -9692,7 +9692,7 @@ ], "assignee": null, "created_date": "2022-03-16T11:08:18.367Z", - "updated_date": null, + "updated_date": "2022-03-16T11:08:18.367Z", "resolved": false } }, @@ -9710,7 +9710,7 @@ "user1" ], "created_date": "2022-03-16T12:40:00.764Z", - "updated_date": null, + "updated_date": "2022-03-16T12:40:00.764Z", "resolved": false } }, @@ -9726,7 +9726,7 @@ ], "assignee": null, "created_date": "2022-03-16T12:49:29.369Z", - "updated_date": null, + "updated_date": "2022-03-16T12:49:29.369Z", "resolved": false } }, diff --git a/tests/python/shared/assets/issues.json b/tests/python/shared/assets/issues.json index c924eee2df48..9aff3cf4b632 100644 --- a/tests/python/shared/assets/issues.json +++ b/tests/python/shared/assets/issues.json @@ -27,7 +27,7 @@ 362.6243902439037 ], "resolved": false, - "updated_date": null + "updated_date": "2022-03-16T12:49:29.369000Z" }, { "assignee": { @@ -59,7 +59,7 @@ 561.4921875 ], "resolved": false, - "updated_date": null + "updated_date": "2022-03-16T12:40:00.764000Z" }, { "assignee": null, @@ -85,7 +85,7 @@ 703.3505859375 ], "resolved": false, - "updated_date": null + "updated_date": "2022-03-16T11:08:18.367000Z" }, { "assignee": null, @@ -111,7 +111,7 @@ 841.5859375 ], "resolved": false, - "updated_date": null + "updated_date": "2022-03-16T11:07:22.170000Z" }, { "assignee": null, @@ -147,7 +147,7 @@ 319.63386727689067 ], "resolved": true, - "updated_date": null + "updated_date": "2022-03-16T11:04:39.444000Z" } ] } \ No newline at end of file