fix: NoneType fixes in Lab test (#17858)
diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.py b/erpnext/healthcare/doctype/lab_test/lab_test.py
index b0bd4c6..8609489 100644
--- a/erpnext/healthcare/doctype/lab_test/lab_test.py
+++ b/erpnext/healthcare/doctype/lab_test/lab_test.py
@@ -300,11 +300,15 @@
elif doc.special_test_items:
item = doc.special_test_items[0]
- table_row = item.lab_test_particulars +" "+ item.result_value
+
+ if item.lab_test_particulars and item.result_value:
+ table_row = item.lab_test_particulars +" "+ item.result_value
elif doc.sensitivity_test_items:
item = doc.sensitivity_test_items[0]
- table_row = item.antibiotic +" "+ item.antibiotic_sensitivity
+
+ if item.antibiotic and item.antibiotic_sensitivity:
+ table_row = item.antibiotic +" "+ item.antibiotic_sensitivity
if table_row:
subject += "<br/>"+table_row