#NEWLINE# def set_object_permissions( sender , instance = None , created = False , **kwargs ) : #NEWLINE# #INDENT# if created : #NEWLINE# #INDENT# for perm in get_perms_for_model ( Team ) : #NEWLINE# #INDENT# assign_perm ( perm . codename , instance . organization , created ) #NEWLINE# if instance . created_by : #NEWLINE# #INDENT# assign_perm ( perm . codename , instance . created_by , instance )