

def retrieve(self, pks, other_pks=None):
    "\n        Retrieve fetches the object based on the following pk logic:\n        if 'other' pks are not found, just use the pk list (coming from URLS)\n        assuming their order is already correct\n        if 'other' pks are found, then use the class keys to\n        get the correct order of pks, look them up\n        "
    if (not other_pks):
        newargs = list(pks)
    else:
        newargs = [other_pks[pks] for key in class_keys(self.cls) if (key in other_pks)]
        newargs.extend(list(reversed(pks)))
    return self.session.query(self.cls).get(newargs)

dataset/ETHPy150Open dealertrack/djangorest-alchemy/djangorest_alchemy/managers.py AlchemyModelManager.retrieve/VarMisuse@43/186 `key`->`pks`