edgeflip / faraday

Pythonic modeling framework for DynamoDB
Other
0 stars 0 forks source link

batch_get_through should handle empty set field #11

Open jesteria opened 10 years ago

jesteria commented 10 years ago

The batch_get_through request method should support items in the join table whose set field is empty (or missing). Currently, though this issue may be avoided by keeping null/empty join items out of the table, if an item with an empty set is included in the table, the entire request may fail, in a confusing manner.

When iterating over join items, it should be enough to check for False-ness, e.g.:

set_values = getattr(link, link_set)
if not set_values:
    continue