bugGNU Health - Bugs: bug #40721, Query error when executing...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #40721: Query error when executing appointment report

Submitter:  Mario Puntin <mariomop>
Submitted:  Wed 27 Nov 2013 12:08:46 PM UTC
   
 
Category:  Functionality Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  smarro
Open/Closed:  Closed Release:  2.3.0
Module:  health Component:  None

Sat 21 Dec 2013 10:41:04 PM UTC, comment #1: 

Fixed in changeset 1092:1c03cb2c5c8b with the migration to python-sql

Thanks Mario for reporting the bug

Sebastián Marró <smarro>
Wed 27 Nov 2013 12:08:46 PM UTC, original submission:  

I'm getting the following when running an appoinment report:

ERROR:tryton.common.common:Traceback (most recent call last):
  File "/trytond/protocols/jsonrpc.py", line 123, in _marshaled_dispatch
    response['result'] = dispatch_method(method, params)
  File "/trytond/protocols/jsonrpc.py", line 156, in _dispatch
    res = dispatch(*args)
  File "/trytond/protocols/dispatcher.py", line 158, in dispatch
    result = rpc.result(meth(args, *kwargs))
  File "/trytond/model/modelsql.py", line 1095, in search
    cursor.execute(query_str, tables_args + qu2)
  File "/trytond/backend/postgresql/database.py", line 306, in execute
    res = self.cursor.execute(sql, params)
DataError: la sintaxis de entrada no es válida para integer: «2013-11-26»
LINE 1: ...ent_date >= '2013-11-26' AND a.appointment_date < '2013-11-2...

la sintaxis de entrada no es válida para integer: «2013-11-26»
LINE 1: ...ent_date >= '2013-11-26' AND a.appointment_date < '2013-11-2...
                                                             ^
To solve it I applied this change in health/health.py, line 1734

---   "a.appointment_date < %s + integer '1' "
+++   "a.appointment_date < date %s + integer '1' "


Mario Puntin <mariomop>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by smarro (Updated the item)
  • -email is unavailable- added by mariomop (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-12-21 smarro StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-12-09 smarro StatusNone In Progress
        Assigned toNone smarro
        ReleaseNone 2.3.0

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code