fix(holiday-list): use same date format for same holiday error message (backport #42606) (#43222)

fix(holiday-list): use same date format for same holiday error message (#42606)

* fix(holiday-list): use same date format for same holiday error message

* chore: fix formatting

---------

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
(cherry picked from commit a435441536)

Co-authored-by: Ananyobrata Pal <74728797+ananyo141@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-09-14 13:36:26 +05:30
committed by GitHub
parent ef6b172616
commit f101a1ce3b

View File

@@ -149,7 +149,11 @@ class HolidayList(Document):
unique_dates = []
for row in self.holidays:
if row.holiday_date in unique_dates:
frappe.throw(_("Holiday Date {0} added multiple times").format(frappe.bold(row.holiday_date)))
frappe.throw(
_("Holiday Date {0} added multiple times").format(
frappe.bold(formatdate(row.holiday_date))
)
)
unique_dates.append(row.holiday_date)