diff --git a/fusion_claims/models/technician_task.py b/fusion_claims/models/technician_task.py index fae97735..7f13d2e0 100644 --- a/fusion_claims/models/technician_task.py +++ b/fusion_claims/models/technician_task.py @@ -533,7 +533,7 @@ class FusionTechnicianTaskClaims(models.Model): 'duration_hours': dur, 'is_in_store': in_shop, 'x_fc_service_call_type': '%s_%s' % (category, timing), - 'description': payload.get('description') or payload.get('issue') or '', + 'description': payload.get('description') or payload.get('issue') or _('Service booking'), } if partner: task_vals['partner_id'] = partner.id diff --git a/fusion_claims/tests/test_service_booking.py b/fusion_claims/tests/test_service_booking.py index 1dc6cba2..caed18a4 100644 --- a/fusion_claims/tests/test_service_booking.py +++ b/fusion_claims/tests/test_service_booking.py @@ -18,11 +18,15 @@ class TestServiceBooking(TransactionCase): }) def test_task_without_order_is_allowed(self): - # repair for a brand-new client: no SO/PO must NOT raise after the relax + # No SO/PO must NOT raise after the relax. description is required and a + # non-in-store task needs an address, so set both here to isolate the test + # to the order-link relaxation (not those unrelated base constraints). t = self.Task.create({ 'task_type': 'repair', 'technician_id': self.tech.id, 'scheduled_date': date(2026, 6, 3), + 'description': 'Test repair', + 'is_in_store': True, }) self.assertTrue(t.id)