示例#1
0
 def serialize_program_search(self, program):
     obj, *_ = ProgramDocument.search().filter('term',
                                               uuid=program.uuid).execute()
     return serializers.TypeaheadProgramSearchSerializer(obj).data
示例#2
0
 def serialize_program_search(self, program):
     obj = SearchQuerySet().models(Program).filter(uuid=program.uuid)[0]
     return serializers.TypeaheadProgramSearchSerializer(obj).data