(target_form_dm, case_type, module)
return target_dm
Find the datum from the target form with the specified case type.
Find the datum from the target form with the specified case type.
Find the datum from the target form with the specified case type .
def get_target_dm(target_form_dm, case_type, module):
        """Find the datum from the target form with the specified case type.
        """
        try:
            [target_dm] = [
                target_meta for target_meta in target_form_dm
                if getattr(target_meta, 'case_type', None) == case_type
            ]
        except ValueError:
            # This either means that the source module (with the registration form) requires datums that the
            # target module (the module which called the reg form).
            # OR it could mean that not all the forms in the target module have the same case management configuration.
            return
        return target_dm
def get_target_dm ( target_form_dm , case_type , module ) : try : [ target_dm ] = [ target_meta for target_meta in target_form_dm if getattr ( target_meta , 'case_type' , None ) == case_type ] except ValueError : # This either means that the source module (with the registration form) requires datums that the # target module (the module which called the reg form). # OR it could mean that not all the forms in the target module have the same case management configuration. return return target_dm