web/views/editcontroller.py
changeset 11033 63d860a14a17
parent 10969 b4de8b1cc135
child 11127 6464edfa95bb
equal deleted inserted replaced
11032:38afb7e23c6c 11033:63d860a14a17
   371 
   371 
   372 
   372 
   373     def check_concurrent_edition(self, formparams, eid):
   373     def check_concurrent_edition(self, formparams, eid):
   374         req = self._cw
   374         req = self._cw
   375         try:
   375         try:
   376             form_ts = datetime.fromtimestamp(float(formparams['__form_generation_time']))
   376             form_ts = datetime.utcfromtimestamp(float(formparams['__form_generation_time']))
   377         except KeyError:
   377         except KeyError:
   378             # Backward and tests compatibility : if no timestamp consider edition OK
   378             # Backward and tests compatibility : if no timestamp consider edition OK
   379             return
   379             return
   380         if req.execute("Any X WHERE X modification_date > %(fts)s, X eid %(eid)s",
   380         if req.execute("Any X WHERE X modification_date > %(fts)s, X eid %(eid)s",
   381                        {'eid': eid, 'fts': form_ts}):
   381                        {'eid': eid, 'fts': form_ts}):