Commit 9f3d7eec authored by Stephanie Marcu's avatar Stephanie Marcu
Browse files

fix bad usage of rql execution : remove quotes around startdate and endate

parent d005442780a6
......@@ -345,7 +345,7 @@ class CalendarEventActionView(StartupView):
# the update afects only the enddate
newenddate = calendarevent.enddate + timedelta(days=daydelta)
newenddate = newenddate + timedelta(minutes=minutedelta)
rql = 'SET C enddate "%(enddate)s" WHERE C eid %(eid)s'
rql = 'SET C enddate %(enddate)s WHERE C eid %(eid)s'
rqlparams = {'enddate' : newenddate, 'eid': eid}
else:
# update by drag and drop has been made
......@@ -354,16 +354,13 @@ class CalendarEventActionView(StartupView):
newstartdate = newstartdate + timedelta(minutes=minutedelta)
newenddate = calendarevent.enddate + timedelta(days=daydelta)
newenddate = newenddate + timedelta(minutes=minutedelta)
rql = 'SET C allday %(allday)s, C startdate "%(startdate)s", '\
'C enddate "%(enddate)s" WHERE C eid %(eid)s'
rql = 'SET C allday %(allday)s, C startdate %(startdate)s, '\
'C enddate %(enddate)s WHERE C eid %(eid)s'
rqlparams = {'allday': allday, 'startdate': newstartdate,
'enddate': newenddate, 'eid': eid }
# execute the action and notify the result
try:
rset = self._cw.execute(rql, rqlparams)
# FIXME the lines below raise an error of "timestamp"
#rql = rql % rqlparams
#rset = self._cw.execute(rql)
json_result = self.return_json_result(0) # sucessful operation
except:
json_result = self.return_json_result(-4) # error during operation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment