Changeset 531


Ignore:
Timestamp:
06/30/11 12:33:37 (9 years ago)
Author:
bas
Message:

a better patch for update_ticket_fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r530 r531  
    733733        #
    734734        sys_dict = dict()
    735         sys_field_list = list()
    736735
    737736        for field in ticket.fields:
    738 
    739             sys_field_list.append(field['name'])
    740737
    741738            try:
     
    743740
    744741            except KeyError:
    745                 #sys_dict[field['name']] = None
     742                sys_dict[field['name']] = None
    746743                pass
    747744
     
    755752                self.print_unicode(s)
    756753
    757             if not field in sys_field_list
     754            if not field in sys_dict.keys()
    758755                self.logger.debug('%s is not a valid field for tickets' %(field))
    759756                continue
     
    775772            ## Check if every value is allowed for this field
    776773            #
    777             if sys_dict.has_key(field):
     774            if sys_dict[field]:
    778775
    779776                if value in sys_dict[field]:
Note: See TracChangeset for help on using the changeset viewer.