1
0
Fork 0

Fix overlap validation

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
merge-requests/760/head
Alfredos-Panagiotis Damkalis 2019-08-29 18:04:05 +03:00
parent 65abadde8e
commit e54c7d09a4
1 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ def check_overlaps(stations_dict):
for j in range(i + 1, total_periods):
start_j = periods[j][0]
end_j = periods[j][1]
if (start_j <= start_i <= end_j) or (start_j <= end_i <= end_j):
if ((start_j <= start_i <= end_j) or (start_j <= end_i <= end_j) or
(start_i <= start_j and end_i >= end_j)):
raise ObservationOverlapError('Observations of station {0} overlap'
.format(station))