#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# super ( SourceAccountMixin , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# unpaid_sources = AccountType . objects . get ( name = names . UNPAID_ACCOUNT_TYPE ) #NEWLINE# sources = unpaid_sources . accounts . all ( ) #NEWLINE# if ( sources . count ( ) > 1 ) : #NEWLINE# #INDENT# self . fields [ 'source_account' ] = forms . ModelChoiceField ( queryset = unpaid_sources . accounts . all ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( sources . count ( ) == 1 ) : #NEWLINE# #INDENT# self . _source_account = unpaid_sources [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise exceptions . ImproperlyConfigured ( "You need to define some 'unpaid source' accounts" )