#NEWLINE# def get_custom_fields( self ) : #NEWLINE# #INDENT# cursor = self . sql_cnx . cursor ( ) #NEWLINE# name_row = 'name' #NEWLINE# type_row = 'type' #NEWLINE# request = ( 'SELECT %s, %s FROM fielddefs WHERE (custom = 1) AND NOT (type = 6)' % ( name_row , type_row ) ) #NEWLINE# cursor . execute ( request ) #NEWLINE# result = list ( [ ] ) #NEWLINE# for row in cursor : #NEWLINE# #INDENT# cf = BzCustomField ( row [ name_row ] [ 3 : ] ) #NEWLINE# cf . type = str ( type_row [ type_row ] ) #NEWLINE# if ( cf . type in [ '2' , '3' ] ) : #NEWLINE# #INDENT# values_cursor = self . sql_cnx . cursor ( ) #NEWLINE# value_row = 'value' #NEWLINE# request = ( 'SELECT %s FROM %s' % ( value_row , row [ name_row ] ) ) #NEWLINE# values_cursor . execute ( request ) #NEWLINE# for v in values_cursor : #NEWLINE# #INDENT# value = v [ value_row ] #NEWLINE# if ( value != '---' ) : #NEWLINE# #INDENT# cf . values . append ( value ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# result . append ( cf ) #NEWLINE# #UNINDENT# return result