Пример #1
0
def get_all_ex(call: APICall, company_id, _):
    conform_tag_fields(call, call.data)
    with translate_errors_context():
        with TimingContext("mongo", "models_get_all_ex"):
            models = Model.get_many_with_join(company=company_id,
                                              query_dict=call.data,
                                              allow_public=True)
        conform_output_tags(call, models)
        call.result.data = {"models": models}
Пример #2
0
def get_all_ex(call):
    assert isinstance(call, APICall)

    with translate_errors_context():
        with TimingContext("mongo", "models_get_all_ex"):
            models = Model.get_many_with_join(
                company=call.identity.company,
                query_dict=call.data,
                allow_public=True,
                query_options=get_all_query_options,
            )

        call.result.data = {"models": models}