Skip to content

Commit

Permalink
[FIX] hr_holidays_compute_days: check for empty dates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Yelizariev committed Oct 13, 2016
1 parent c327921 commit 40264a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hr_holidays_compute_days/models/hr_holidays.py
Expand Up @@ -74,6 +74,8 @@ def _compute_number_of_days(self):
date_from = self.date_from
date_to = self.date_to
employee_id = self.employee_id.id
if not date_from or not date_to:
return 0
days = self._get_number_of_days(date_from, date_to, None)
if date_to == date_from:
days = 1
Expand Down

0 comments on commit 40264a1

Please sign in to comment.