#NEWLINE# def handle( self , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Make it happen.\n        ' #NEWLINE# self . set_options ( ) #NEWLINE# self . header ( 'Creating GitHub issues for model models without a UNIQUE_KEY' ) #NEWLINE# missing_list = [ ] #NEWLINE# model_count = 0 #NEWLINE# for m in get_model_list ( ) : #NEWLINE# #INDENT# model_count += 1 #NEWLINE# if ( not m . UNIQUE_KEY ) : #NEWLINE# #INDENT# self . log ( ( 'Missing: %s.%s' % ( m ( ) . klass_group , m ( ) . klass_name ) ) ) #NEWLINE# missing_list . append ( m ) #NEWLINE# #UNINDENT# #UNINDENT# missing_count = len ( missing_list ) #NEWLINE# if ( not missing_count ) : #NEWLINE# #INDENT# self . success ( ( 'All %s models have a UNIQUE_KEY!' % model_count ) ) #NEWLINE# return False #NEWLINE# #UNINDENT# self . log ( ( '- %s/%s (%d%%) of fields lack a UNIQUE_KEY' % ( intcomma ( missing_count ) , intcomma ( model_count ) , calculate . percentage ( missing_count , model_count ) ) ) ) #NEWLINE# for model in missing_list [ 1 : ] : #NEWLINE# #INDENT# self . create_issue ( model )