scripts: add an assertion

This commit is contained in:
Benjamin Dauvergne 2013-01-06 21:30:44 +01:00
parent 31fd92592a
commit 391efb169e
1 changed files with 1 additions and 0 deletions

View File

@ -98,6 +98,7 @@ def create_event(line, service, tables_data):
exception_to = None
exception_error = False
if line['rr_ev_id']:
assert line['rr_ev_id'].startswith('ev_')
ev_id = int(line['rr_ev_id'][3:])
exception_date = _to_date(line['date_rdv'])
exception_to = Event.objects.filter(old_ev_id=ev_id,