refactor: use db.get_single_value

This commit is contained in:
Ankush Menat
2024-01-09 21:56:47 +05:30
parent 74ceb6da5e
commit bb18ae82cf
26 changed files with 44 additions and 50 deletions

View File

@@ -156,7 +156,7 @@ def check_if_within_operating_hours(workstation, operation, from_datetime, to_da
if not frappe.db.get_single_value("Manufacturing Settings", "allow_production_on_holidays"):
check_workstation_for_holiday(workstation, from_datetime, to_datetime)
if not cint(frappe.db.get_value("Manufacturing Settings", None, "allow_overtime")):
if not cint(frappe.db.get_single_value("Manufacturing Settings", "allow_overtime")):
is_within_operating_hours(workstation, operation, from_datetime, to_datetime)