#NEWLINE# def pre_save( self , instance , add ) : #NEWLINE# #INDENT# 'If auto is set, generate a UUID at random.' #NEWLINE# if ( self . _auto_add and add and ( not getattr ( instance , self . attname ) ) ) : #NEWLINE# #INDENT# uuid_value = self . _auto_add ( ) #NEWLINE# setattr ( instance , self . attname , uuid_value ) #NEWLINE# return uuid_value #NEWLINE# #UNINDENT# return super ( UUIDField , self ) . pre_save ( instance , add )