[FIX] LEAVE: Fixed decimal leave rounding in update of leave type

This commit is contained in:
Horilla
2025-03-27 15:53:56 +05:30
parent bfd824643e
commit f9ee281a72

View File

@@ -253,7 +253,6 @@ class UpdateLeaveTypeForm(ConditionForm):
cleaned_data = super().clean()
if "exceed_days" in self.errors:
del self.errors["exceed_days"]
cleaned_data["count"] = round(cleaned_data["count"] * 2) / 2
if not cleaned_data["limit_leave"]:
cleaned_data["total_days"] = LEAVE_MAX_LIMIT
cleaned_data["reset"] = True