mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
Merge pull request #23607 from marination/holiday_list
fix: Convert dates to datetime.date before comparing in Holiday List
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ class HolidayList(Document):
|
|||||||
|
|
||||||
|
|
||||||
def validate_days(self):
|
def validate_days(self):
|
||||||
if self.from_date > self.to_date:
|
if getdate(self.from_date) > getdate(self.to_date):
|
||||||
throw(_("To Date cannot be before From Date"))
|
throw(_("To Date cannot be before From Date"))
|
||||||
|
|
||||||
for day in self.get("holidays"):
|
for day in self.get("holidays"):
|
||||||
|
|||||||
Reference in New Issue
Block a user