Closed patcon closed 8 years ago
ya this sounds reasonable - wana open a PR?
Ok, I basically just skimmed through for any plural model property, and ensured that it returned an empty list that's still an iterable (rather than None
), if it was plural. Singular properties still return None
.
There are quite a few places in the models where, if no results exist, we return
None
. But there are quite a few places where a queryset is assumed to have results, and we chain it as if it's an iterable.Can we start returning an empty list i n these places so that we don't need to keep accommodating special cases?
Example: