On Thu, 2009-01-15 at 08:03 -0300, Eduardo Willians wrote:

> Are you sure this gonna work?
> 
> I tried this:
> 
> >>> res2 = store.find(Client, Client.cpf.is_in(result))
> 
> And I got this:
> 
> TypeError: Expected int, found <class 'app.model.tables.Client'>:
> <app.model.tables.Client object at 0x018DF610>

yes that produces errors but a quick change fixes it:
ids = [Company.id for id in company_ids]
companies = store.find(Company, Company.id.is_in(ids))

Thanks guys this helps a lot, I am sure there must be a better way to do
this but efficiency isn't a big concern in this application (desktop
application with a small result set. It sure would be nice if there were
a nicer, more "pythonic" way to do it in Storm however.
-- 
Gordon Allott ([email protected])

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to