Example #1
0
    def shotid_filepub_query(self, showobj, shotid, file_type_list):
        """
            :param showobj:
            :param   shotid:
            :param file_type_list: (list) pft Short name interface
            :return list: list of PfInfoDb
         """

        file_type_list_id = [
            self.get_ftid_from_short_name(x) for x in file_type_list
        ]
        file_type_list_id = filter(lambda x: x != '', file_type_list_id)

        pft_list = SQ.entity_shot_query_versions(
            showobj.id,
            shotid,
            file_type_list_id=file_type_list_id,
            conn=self.get_conn())

        return pft_list
Example #2
0
    def shotid_filepubobj_query(self, showobj, shotobj, file_type_object_list):
        """
            :param showobj:
            :param shotobj:
            :param file_type_list: (list) pft Short name interface
            :return list: list of PfInfoDb

         """
        file_type_list_id = [x.id for x in file_type_object_list]
        file_type_list_id = filter(lambda x: x != '', file_type_list_id)
        pf_list = SQ.entity_shot_query_versions(
            showobj.id,
            shotobj.id,
            file_type_list_id=file_type_list_id,
            conn=self.get_conn())
        res = list()
        for ftol in file_type_object_list:
            res.append(
                [x for x in pf_list if x.published_file_type["id"] == ftol.id])
        return res

        return pf_list