Opened 16 years ago
Closed 15 years ago
#5276 closed defect (worksforme)
listAttachments error
Reported by: | Owned by: | Alec Thomas | |
---|---|---|---|
Priority: | high | Component: | XmlRpcPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Durring our development using XmlRpcPlugin from java, we found a problem with listAttachments function. The error message says that the object Attachment doesn't contain attribute "time". We managed to solve this problem by changing t.time with t.date in file ticket.py, method listAttachments and recompile the plugin. Below you can find the old method and the new one:
old method - def listAttachments(self, req, ticket):
""" Lists attachments for a given ticket. Returns (filename, description, size, time, author) for each attachment.""" for t in Attachment.select(self.env, 'ticket', ticket):
yield (t.filename, t.description or , t.size, t.time, t.author)
new method - def listAttachments(self, req, ticket):
""" Lists attachments for a given ticket. Returns (filename, description, size, time, author) for each attachment.""" for t in Attachment.select(self.env, 'ticket', ticket):
yield (t.filename, t.description or , t.size, t.date, t.author)
This seems to be fixed as part of [2609] - and current line now looks like: