- commit
- 928557c0031daf33221d2d6a841951f3c01dea59
- parent
- 59fd49647b2c60c121337eb6fdd410dc691a709e
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2019-08-23 08:58
make end exclusive for compatibility with ical https://tools.ietf.org/html/rfc5545#page-54
Diffstat
| M | rebelstuff/models.py | 6 | +++--- |
1 files changed, 3 insertions, 3 deletions
diff --git a/rebelstuff/models.py b/rebelstuff/models.py
@@ -19,7 +19,7 @@ class Stuff(models.Model): 19 19 20 20 items = BookingItem.objects.filter( 21 21 booking__start__lte=day,22 -1 booking__end__gte=day,-1 22 booking__end__gt=day, 23 23 stuff=self, 24 24 ).exclude( 25 25 booking__status='returned', @@ -54,9 +54,9 @@ class Booking(models.Model): 54 54 if not self.start or not self.end: 55 55 return 56 5657 -1 if self.end < self.start:-1 57 if self.end <= self.start: 58 58 raise ValidationError({59 -1 'end': _('Cannot be before start.'),-1 59 'end': _('Must be after start.'), 60 60 }) 61 61 62 62 def iter_days(self):