#NEWLINE# def check_create_permission( self , request , mode ) : #NEWLINE# #INDENT# if ( ( 'project' in request . data ) and ( not check_parent_perm ( request , Project , request . data [ 'project' ] , mode ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( ( 'milestone' in request . data ) and ( not check_parent_perm ( request , Milestone , request . data [ 'milestone' ] , mode ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( ( 'parent' in request . data ) and ( not check_parent_perm ( request , Task , request . data [ 'parent' ] , mode ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# request . data . setdefault ( 'parent' , None ) #NEWLINE# #UNINDENT# return True