do not force end time if it's not defined
This commit is contained in:
parent
94ba9733d1
commit
51b9ce1f8f
|
@ -1162,14 +1162,12 @@ class SyncFromPcfDbView(BrowserView):
|
|||
object.end = datetime.datetime.strptime(
|
||||
'%s %s' % (datefin, heurefin),
|
||||
'%Y-%m-%d %H:%M:%S')
|
||||
else:
|
||||
object.end = datetime.datetime.strptime(
|
||||
elif datedeb != datefin:
|
||||
object.end = datetime.datetime.strptime(
|
||||
'%s' % datefin, '%Y-%m-%d')
|
||||
if object.end < object.start:
|
||||
object.end = object.start
|
||||
|
||||
if state == 'S_OPEN' and type == 'SE' and datefin and not finreel:
|
||||
if object.end < datetime.datetime.now():
|
||||
if object.end and object.end < datetime.datetime.now():
|
||||
# seances still open, with no real end date, but an end date
|
||||
# that's already in the past, alter the end date.
|
||||
object.end = object.end + datetime.timedelta(seconds=600)
|
||||
|
|
Reference in New Issue