Bug #6656

Error when filtering by string value on numeric column

Added by François Blackburn 6 months ago. Updated 6 months ago.

Status:Resolved
Priority:Normal
Assignee:François Blackburn
Category:REST API
Target version:17.07
Security issue:No Read documentation?:No
In versions:<= 17.06

Description

When GET /outcalls?id=toto
Then I get an error:

["Unexpected error: (DataError) invalid input syntax for integer: \"toto\"\nLINE 3: WHERE outcall.id = 'toto' ORDER BY outcall.id ASC\n                           ^\n 'SELECT outcall.id AS outcall_id, outcall.name AS outcall_name, outcall.context AS outcall_context, outcall.internal AS outcall_internal, outcall.preprocess_subroutine AS outcall_preprocess_subroutine, outcall.hangupringtime AS outcall_hangupringtime, outcall.commented AS outcall_commented, outcall.description AS outcall_description \\nFROM outcall \\nWHERE outcall.id = %(id_1)s ORDER BY outcall.id ASC' {'id_1': u'toto'}"]

Expected: 200

{"items": [], "total": 0}

Note: We can reproduce this error with every resource

History

#1 Updated by François Blackburn 6 months ago

  • Status changed from New to Code review

#2 Updated by François Blackburn 6 months ago

  • Subject changed from Error when filter by string value on numeric column to Error when filtering by string value on numeric column

#3 Updated by Pascal Cadotte-Michaud 6 months ago

  • Status changed from Code review to Resolved

Also available in: Atom PDF