Do not store in calendar invalid event

The user could create an event with an end date before the start date during
edition. So event must not be added to the store of GooCalendar because it does
not support such inconsistency.

issue5723
review33291002
This commit is contained in:
Cédric Krier committed 2016-08-31 23:00:05 +02:00
1 parent d214800cda
commit b58937a4d5
1 file changed
+4
@@ -95,6 +95,10 @@ class Calendar_(goocalendar.Calendar):
elif not end:
all_day = True
# Skip invalid event
if end is not None and start > end:
continue
# TODO define color code
label = '\n'.join(record[attrs['name']].get_client(record)
for attrs in self.fields).rstrip()