def _entity(sender, data):
    import invenio_circulation_ill.models as models

    id = data
    models_entities = {'ill_loan_cycle': models.IllLoanCycle,
                       'ill_supplier': models.IllSupplier}

    entity = models_entities.get(sender)
    res = entity.get(id) if entity else None

    return {'name': 'ill_entity', 'result': res}
def _entity(sender, data):
    import invenio_circulation_acquisition.models as models

    id = data

    models_entities = {'acquisition_loan_cycle': models.AcquisitionLoanCycle,
                       'acquisition_vendor': models.AcquisitionVendor}

    entity = models_entities.get(sender)
    res = entity.get(id) if entity else None

    return {'name': 'acquisition_entity', 'result': res}
def _entity(sender, data):
    import invenio_circulation_ill.models as models

    id = data
    models_entities = {
        'ill_loan_cycle': models.IllLoanCycle,
        'ill_supplier': models.IllSupplier
    }

    entity = models_entities.get(sender)
    res = entity.get(id) if entity else None

    return {'name': 'ill_entity', 'result': res}
示例#4
0
def _entity(sender, data):
    import invenio_circulation_acquisition.models as models

    id = data

    models_entities = {
        'acquisition_loan_cycle': models.AcquisitionLoanCycle,
        'acquisition_vendor': models.AcquisitionVendor
    }

    entity = models_entities.get(sender)
    res = entity.get(id) if entity else None

    return {'name': 'acquisition_entity', 'result': res}
示例#5
0
def _entity(sender, data):
    import invenio_circulation.models as models

    id = data

    models_entities = {'record':  models.CirculationRecord,
                       'user': models.CirculationUser,
                       'item': models.CirculationItem,
                       'loan_cycle': models.CirculationLoanCycle,
                       'location': models.CirculationLocation,
                       'event': models.CirculationEvent,
                       'mail_template': models.CirculationMailTemplate,
                       'loan_rule': models.CirculationLoanRule,
                       'loan_rule_match': models.CirculationLoanRuleMatch}

    entity = models_entities.get(sender)
    res = entity.get(id) if entity else None

    return {'name': 'entity', 'result': res}