Project

General

Profile

Bug #482

TypeError in alertlisting view

Added by Jean-Charles ROGEZ about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
High
Target version:
-
Start date:
04/25/2012
Due date:
% Done:

100%

Resolution:
fixed

Description

Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/prewikkapro/Core.py", line 391, in process
getattr(view_object, view["handler"])()
File "/usr/lib/python2.6/site-packages/prewikkapro/views/alertlisting.py", line 1456, in render
total = self._setMessages(criteria)
File "/usr/lib/python2.6/site-packages/prewikkapro/views/alertlisting.py", line 1327, in _setMessages
return self._setAggregatedMessagesNoValues(criteria, ag_s, ag_t, ag_c, ag_a)
File "/usr/lib/python2.6/site-packages/prewikkapro/views/alertlisting.py", line 1265, in _setAggregatedMessagesNoValues
self._getMissingAggregatedInfos(message, valueshash, parameters, criteria2, aggregated_count, time_min, time_max)
File "/usr/lib/python2.6/site-packages/prewikkapro/views/alertlisting.py", line 1110, in _getMissingAggregatedInfos
ticket_ids = self.env.db.getTicketIDs(classification, source_value, target_value, time_min, time_max)
File "/usr/lib/python2.6/site-packages/prewikkapro/Database.py", line 406, in getTicketIDs
constraints.append("(classification IS NULL OR classification = %s)" % self.escape(classification))
File "/usr/lib/python2.6/site-packages/prewikkapro/Database.py", line 146, in escape
return utils.toUnicode(preludedb_sql_escape(self._sql, data))
TypeError: expected None or string, unicode found

History

#1 Updated by Jean-Charles ROGEZ about 8 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
  • Resolution set to fixed

Some empty unicode strings are passed to Database.escape and raise a TypeError.

Fixed in commit:3065b274846476dde72d5bc6ddd38830ea066843

#2 Updated by Jean-Charles ROGEZ about 8 years ago

  • Project changed from Prewikka Pro to Prewikka
  • Target version deleted (1.0.1)

Also available in: Atom PDF