From 2db0854eef7190fb3f6e150a94ebe8d6fb93da54 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 2 Jul 2022 16:55:52 -0700 Subject: [PATCH] fix conflicting migrations --- .../{1021_paperlesstask.py => 1022_paperlesstask.py} | 2 +- src/documents/serialisers.py | 2 +- src/documents/tests/test_api.py | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) rename src/documents/migrations/{1021_paperlesstask.py => 1022_paperlesstask.py} (97%) diff --git a/src/documents/migrations/1021_paperlesstask.py b/src/documents/migrations/1022_paperlesstask.py similarity index 97% rename from src/documents/migrations/1021_paperlesstask.py rename to src/documents/migrations/1022_paperlesstask.py index c42aba7c4..f1ecb244f 100644 --- a/src/documents/migrations/1021_paperlesstask.py +++ b/src/documents/migrations/1022_paperlesstask.py @@ -26,7 +26,7 @@ class Migration(migrations.Migration): dependencies = [ ("django_q", "0014_schedule_cluster"), - ("documents", "1020_merge_20220518_1839"), + ("documents", "1021_webp_thumbnail_conversion"), ] operations = [ diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index 5365f389e..3b9f29555 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -649,7 +649,7 @@ class AcknowledgeTasksViewSerializer(serializers.Serializer): count = PaperlessTask.objects.filter(id__in=tasks).count() if not count == len(tasks): raise serializers.ValidationError( - f"Some tasks in {name} don't exist or were " f"specified twice.", + f"Some tasks in {name} don't exist or were specified twice.", ) def validate_tasks(self, tasks): diff --git a/src/documents/tests/test_api.py b/src/documents/tests/test_api.py index 373dc3e47..38fe6f07b 100644 --- a/src/documents/tests/test_api.py +++ b/src/documents/tests/test_api.py @@ -2661,7 +2661,6 @@ class TestTasks(APITestCase): self.client.force_authenticate(user=self.user) def test_get_tasks(self): - task_id1 = str(uuid.uuid4()) PaperlessTask.objects.create(task_id=task_id1) Task.objects.create( @@ -2687,7 +2686,6 @@ class TestTasks(APITestCase): self.assertIsNone(returned_task2["attempted_task"]) def test_acknowledge_tasks(self): - task_id = str(uuid.uuid4()) task = PaperlessTask.objects.create(task_id=task_id) @@ -2701,4 +2699,4 @@ class TestTasks(APITestCase): self.assertEqual(response.status_code, 200) response = self.client.get(self.ENDPOINT) - self.assertEqual(len(response.data), 0) \ No newline at end of file + self.assertEqual(len(response.data), 0)