(self, target_module, form, source_form_datums)
return stack_frames
Set up the stack blocks for a single case list form action.
        :param target_module: Module that the user is returning to
        :param form: Case list form
        :param source_form_datums: List of datum from the case list form
        :return: CaseListFormStackFrames object
Set up the stack blocks for a single case list form action.
        :param target_module: Module that the user is returning to
        :param form: Case list form
        :param source_form_datums: List of datum from the case list form
        :return: CaseListFormStackFrames object
Set up the stack blocks for a single case list form action . : param target_module : Module that the user is returning to : param form : Case list form : param source_form_datums : List of datum from the case list form : return : CaseListFormStackFrames object
def _get_stack_frames(self, target_module, form, source_form_datums):
        """
        Set up the stack blocks for a single case list form action.
        :param target_module: Module that the user is returning to
        :param form: Case list form
        :param source_form_datums: List of datum from the case list form
        :return: CaseListFormStackFrames object
        """
        from corehq.apps.app_manager.const import WORKFLOW_CASE_LIST
        source_session_var = self._get_source_session_var(form, target_module.case_type)
        source_case_id = session_var(source_session_var)
        case_count = CaseIDXPath(source_case_id).case().count()
        target_command = id_strings.menu_id(target_module)

        if target_module.case_list_form.post_form_workflow == WORKFLOW_CASE_LIST:
            frame_case_created = None
            frame_case_not_created = StackFrameMeta(
                self.get_if_clause(None, target_command), current_session=source_form_datums
            )
        else:
            frame_case_created = StackFrameMeta(
                self.get_if_clause(case_count.gt(0), target_command), current_session=source_form_datums
            )
            frame_case_not_created = StackFrameMeta(
                self.get_if_clause(case_count.eq(0), target_command), current_session=source_form_datums
            )

        stack_frames = CaseListFormStackFrames(
            case_created=frame_case_created, case_not_created=frame_case_not_created
        )
        stack_frames.source_session_var = source_session_var
        return stack_frames
def _get_stack_frames ( self , target_module , form , source_form_datums ) : from corehq . apps . app_manager . const import WORKFLOW_CASE_LIST source_session_var = self . _get_source_session_var ( form , target_module . case_type ) source_case_id = session_var ( source_session_var ) case_count = CaseIDXPath ( source_case_id ) . case ( ) . count ( ) target_command = id_strings . menu_id ( target_module ) if target_module . case_list_form . post_form_workflow == WORKFLOW_CASE_LIST : frame_case_created = None frame_case_not_created = StackFrameMeta ( self . get_if_clause ( None , target_command ) , current_session = source_form_datums ) else : frame_case_created = StackFrameMeta ( self . get_if_clause ( case_count . gt ( 0 ) , target_command ) , current_session = source_form_datums ) frame_case_not_created = StackFrameMeta ( self . get_if_clause ( case_count . eq ( 0 ) , target_command ) , current_session = source_form_datums ) stack_frames = CaseListFormStackFrames ( case_created = frame_case_created , case_not_created = frame_case_not_created ) stack_frames . source_session_var = source_session_var return stack_frames