#2779: MiniFieldStorage instance has no attribute 'strip'
----------------------------------+-----------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  jonas
     Type:  defect                |       Status:  new  
 Priority:  high                  |    Milestone:       
Component:  ticket system         |      Version:  devel
 Severity:  blocker               |   Resolution:       
 Keywords:                        |  
----------------------------------+-----------------------------------------
Comment (by [EMAIL PROTECTED]):

 I don't know anything about your design or trac itself (just know it since
 yesterday), but i have fixed the bug for myself with:

 {{{
     def populate(self, values):
         """Populate the ticket with 'suitable' values from a dictionary"""
         field_names = [f['name'] for f in self.fields]
         for name in [name for name in values.keys() if name in
 field_names]:
             value=  values.get(name, '')
             if isinstance(value, str):
                 self[name] = value
             else:
                 try :
                     self[name] = value.value
                 except:
                     raise TypeError, 'Unexpected type for population: %s'
 % type(value)
 }}}

 This is an ugly hack - but works for me. I leave the status of this ticket
 as it is, because I'm pretty sure that you know the right place where to
 fix it in an better way.

 Greetings
 Steffen Oschatz

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2779>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to