Modify ↓
Opened 15 years ago
Closed 15 years ago
#9218 closed defect (fixed)
TypeError: not indexable
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | plugin - spam-filter |
Component: | plugin/spamfilter | Version: | 0.12dev |
Severity: | critical | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
To re
Beim Ausführen der Operation POST auf '/attachment/ticket/9217' hat Trac einen internen Fehler gemeldet.
Anfrageparameter:
{'__FORM_TOKEN': u'....', 'action': u'new', 'attachment': FieldStorage('attachment', 'make_comment_optional', '# HG changeset patch\n# Parent e537b06a46f5f056403884222aabd177d5728263\n\ndiff -r e537b06a46f5 trac/ticket/model.py\n--- a/trac/ticket/model.py\tWed Oct 14 00:21:33 2009 +0200\n+++ b/trac/ticket/model.py\tSun Apr 11 15:50:40 2010 +0200\n@@ -234,7 +234,7 @@\n \n return self.id\n \n- def save_changes(self, author, comment, when=None, db=None, cnum=\'\'):\n+ def save_changes(self, author, comment=None, when=None, db=None, cnum=\'\'):\n """\n Store ticket changes in the database. The ticket must already exist in\n the database. Returns False if there were no changes to save, True\ndiff -r e537b06a46f5 trac/ticket/tests/model.py\n--- a/trac/ticket/tests/model.py\tWed Oct 14 00:21:33 2009 +0200\n+++ b/trac/ticket/tests/model.py\tSun Apr 11 15:50:40 2010 +0200\n@@ -123,6 +123,19 @@\n self.assertEqual(ticket_id, ticket.id)\n self.assertEqual(ticket.resource.id, ticket_id)\n \n+ def test_can_save_ticket_without_explicit_comment(self):\n+ ticket = Ticket(self.env)\n+ ticket.insert()\n+ ticket[\'summary\'] = \'another summary\'\n+ \n+ ticket.save_changes(\'foo\')\n+ \n+ changes = ticket.get_changelog()\n+ comment_change = filter(lambda change: change[2] == \'comment\', changes)[0]\n+ self.assertEqual(\'\', comment_change[3])\n+ self.assertEqual(\'\', comment_change[4])\n+\n+\n def test_ticket_default_values(self):\n """\n Verify that a ticket uses default values specified in the configuration\n'), 'author': u'Felix Schwarz <felix.schwarz@agile42.com>', 'description': u'Make comment parameter optional', 'id': u'9217', 'path': u'9217', 'realm': u'ticket'}
Systeminformationen
Trac | 0.12dev-r9466
|
Babel | 0.9.4
|
Docutils | 0.6
|
Genshi | 0.6dev-r1096
|
psycopg2 | 2.0.8
|
Pygments | 1.2.2dev-20100224
|
Python | 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) [GCC 4.3.2]
|
pytz | 2010g
|
setuptools | 0.6c9
|
Subversion | 1.5.1 (r32289)
|
jQuery | 1.4.2
|
Enabled Plugins
Python-Zurückverfolgungsinformationen
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 512, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 233, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-x86_64/egg/trac/attachment.py", line 446, in process_request self._do_save(req, attachment) File "build/bdist.linux-x86_64/egg/trac/attachment.py", line 642, in _do_save attachment): File "build/bdist.linux-x86_64/egg/tracspamfilter/adapters.py", line 123, in validate_attachment if upload: File "/usr/lib/python2.5/cgi.py", line 633, in __len__ return len(self.keys()) File "/usr/lib/python2.5/cgi.py", line 609, in keys raise TypeError, "not indexable" TypeError: not indexable
Attachments (1)
Change History (5)
comment:1 by , 15 years ago
comment:3 by , 15 years ago
Component: | ticket system → plugin/spamfilter |
---|---|
Milestone: | 0.12 → spam-filter-plugin |
Owner: | set to |
Note:
See TracTickets
for help on using tickets.
Actually this happened when I wanted to upload this patch for #9217: