mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Fix form validation
This commit is contained in:
parent
b38521db69
commit
5c0a4ce748
1 changed files with 9 additions and 8 deletions
|
@ -300,6 +300,7 @@ class MandateForm(ModelForm):
|
|||
def clean(self):
|
||||
cleaned_data = super(MandateForm, self).clean()
|
||||
start_date, end_date = cleaned_data['start_date'], cleaned_data['end_date']
|
||||
if end_date:
|
||||
included_mandates = Mandate.objects.filter(
|
||||
Q(start_date__gte=start_date, start_date__lt=end_date)
|
||||
| Q(end_date__gt=start_date, end_date__lte=end_date)
|
||||
|
|
Loading…
Reference in a new issue