Project for the UPV to develop an app like BlaBlaCar but only for UPV people.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'develop'

+5 -3
+1 -1
requirements/local.txt
··· 2 2 coverage==4.0.3 3 3 django-test-plus==1.0.16 4 4 factory_boy==2.8.0 5 - django-debug-toolbar==1.4 5 + django-debug-toolbar==1.7
+1 -1
requirements/production.txt
··· 1 1 -r base.txt 2 2 cx_Oracle==5.2.1 3 - uwsgi==2.0.14 3 + uwsgi==2.0.15
+3 -1
upvcarshare/journeys/forms.py
··· 97 97 now = timezone.now() 98 98 if departure < now: 99 99 raise forms.ValidationError(_("No puedes crear viajes en el pasado")) 100 - if Journey.objects.overlaps(self.user, departure, time_window).exists(): 100 + overlaps = Journey.objects.overlaps(self.user, departure, time_window) 101 + if (self.instance.pk and overlaps.exclude(pk=self.instance.pk).exists()) or \ 102 + (self.instance.pk is None and overlaps.exists()): 101 103 raise forms.ValidationError(_("Ya tienes un viaje que sale muy cerca de esta hora")) 102 104 return departure 103 105