(self, user_types)
:return: FormSubmittedByFilter with user_ids for selected user types
:return: FormSubmittedByFilter with user_ids for selected user types
: return : FormSubmittedByFilter with user_ids for selected user types
def _get_user_type_filters(self, user_types):
        """
        :return: FormSubmittedByFilter with user_ids for selected user types
        """
        if user_types:
            form_filters = []
            # Select all mobile workers if both active and deactivated users are selected
            if HQUserType.ACTIVE in user_types and HQUserType.DEACTIVATED in user_types:
                form_filters.append(UserTypeFilter(BaseFilterExportDownloadForm._USER_MOBILE))
            user_ids = self.get_user_ids_for_user_types(
                admin=HQUserType.ADMIN in user_types,
                unknown=HQUserType.UNKNOWN in user_types,
                web=HQUserType.WEB in user_types,
                demo=HQUserType.DEMO_USER in user_types,
                commtrack=False,
                active=HQUserType.ACTIVE in user_types,
                deactivated=HQUserType.DEACTIVATED in user_types,
            )
            form_filters.append(FormSubmittedByFilter(user_ids))
            return form_filters
def _get_user_type_filters ( self , user_types ) : if user_types : form_filters = [ ] # Select all mobile workers if both active and deactivated users are selected if HQUserType . ACTIVE in user_types and HQUserType . DEACTIVATED in user_types : form_filters . append ( UserTypeFilter ( BaseFilterExportDownloadForm . _USER_MOBILE ) ) user_ids = self . get_user_ids_for_user_types ( admin = HQUserType . ADMIN in user_types , unknown = HQUserType . UNKNOWN in user_types , web = HQUserType . WEB in user_types , demo = HQUserType . DEMO_USER in user_types , commtrack = False , active = HQUserType . ACTIVE in user_types , deactivated = HQUserType . DEACTIVATED in user_types , ) form_filters . append ( FormSubmittedByFilter ( user_ids ) ) return form_filters