#NEWLINE# def _multiple_pr_redirect_action_number( self , session , pr_ids ) : #NEWLINE# #INDENT# if ( len ( pr_ids ) == 0 ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# return session . query ( gpdb . gpdb . PolicyAction ) . join ( gpdb . gpdb . PolicyRuleActionAssociation ) . filter ( gpdb . gpdb . PolicyRuleActionAssociation . policy_rule_id . in_ ( pr_ids ) ) . filter ( ( gpdb . gpdb . PolicyAction . action_type == gconst . GP_ACTION_REDIRECT ) ) . count ( )