diff --git a/gregor_django/gregor_anvil/migrations/0028_populate_uploadcycle_date_ready_for_compute.py b/gregor_django/gregor_anvil/migrations/0028_populate_uploadcycle_date_ready_for_compute.py index b9728c1b..db6819f0 100644 --- a/gregor_django/gregor_anvil/migrations/0028_populate_uploadcycle_date_ready_for_compute.py +++ b/gregor_django/gregor_anvil/migrations/0028_populate_uploadcycle_date_ready_for_compute.py @@ -10,7 +10,7 @@ def populate_uploadcycle_date_ready_for_compute(apps, schema_editor): UploadCycle = apps.get_model("gregor_anvil", "UploadCycle") # Create one UploadCycle for each unique version. for row in UploadCycle.objects.all(): - assumed_date_ready_for_compute = row.start_date + timedelta(days=7) + assumed_date_ready_for_compute = row.start_date + timedelta(weeks=4) if row.end_date <= timezone.localdate(): row.date_ready_for_compute = assumed_date_ready_for_compute row.full_clean() diff --git a/gregor_django/gregor_anvil/migrations/0029_populate_uploadworkspace_date_qc_completed.py b/gregor_django/gregor_anvil/migrations/0029_populate_uploadworkspace_date_qc_completed.py index e860b22c..aa06ff42 100644 --- a/gregor_django/gregor_anvil/migrations/0029_populate_uploadworkspace_date_qc_completed.py +++ b/gregor_django/gregor_anvil/migrations/0029_populate_uploadworkspace_date_qc_completed.py @@ -9,7 +9,7 @@ def populate_uploadworkspace_date_qc_complete(apps, schema_editor): UploadWorkspace = apps.get_model("gregor_anvil", "UploadWorkspace") # Create one UploadWorkspace for each unique version. for row in UploadWorkspace.objects.all(): - assumed_date_qc_completed = row.upload_cycle.end_date + timedelta(days=7) + assumed_date_qc_completed = row.upload_cycle.end_date + timedelta(weeks=2) if assumed_date_qc_completed <= timezone.localdate(): row.date_qc_completed = assumed_date_qc_completed row.full_clean() diff --git a/gregor_django/gregor_anvil/tests/test_migrations.py b/gregor_django/gregor_anvil/tests/test_migrations.py index 62dca0e9..fb377f31 100644 --- a/gregor_django/gregor_anvil/tests/test_migrations.py +++ b/gregor_django/gregor_anvil/tests/test_migrations.py @@ -352,7 +352,7 @@ def prepare(self): def test_date_completed(self): UploadCycle = self.old_state.apps.get_model("gregor_anvil", "UploadCycle") upload_cycle = UploadCycle.objects.get(pk=self.upload_cycle_past.pk) - self.assertEqual(upload_cycle.date_ready_for_compute, upload_cycle.start_date + timedelta(days=7)) + self.assertEqual(upload_cycle.date_ready_for_compute, upload_cycle.start_date + timedelta(weeks=4)) upload_cycle = UploadCycle.objects.get(pk=self.upload_cycle_current.pk) self.assertIsNone(upload_cycle.date_ready_for_compute) upload_cycle = UploadCycle.objects.get(pk=self.upload_cycle_future.pk) @@ -432,7 +432,9 @@ def prepare(self): def test_date_qc_completed(self): UploadWorkspace = self.old_state.apps.get_model("gregor_anvil", "UploadWorkspace") upload_workspace = UploadWorkspace.objects.get(pk=self.upload_workspace_past.pk) - self.assertEqual(upload_workspace.date_qc_completed, upload_workspace.upload_cycle.end_date + timedelta(days=7)) + self.assertEqual( + upload_workspace.date_qc_completed, upload_workspace.upload_cycle.end_date + timedelta(weeks=2) + ) upload_workspace = UploadWorkspace.objects.get(pk=self.upload_workspace_current.pk) self.assertIsNone(upload_workspace.date_qc_completed) upload_workspace = UploadWorkspace.objects.get(pk=self.upload_workspace_future.pk) @@ -514,7 +516,6 @@ def prepare(self): workspace=workspace, ) - def test_date_completed(self): CombinedConsortiumDataWorkspace = self.new_state.apps.get_model("gregor_anvil", "CombinedConsortiumDataWorkspace") workspace = CombinedConsortiumDataWorkspace.objects.get(pk=self.combined_workspace_shared.pk)