[PATCH 2/8] xmlrpc: Change filter(...) to get(...)
stephenfinucane at hotmail.com
Sun Sep 4 06:17:10 AEST 2016
On 03 Sep 17:07, Daniel Axtens wrote:
> filter() returns a list or , and get() returns an object or raises an
> Currently, we use filter() inside a try/except model.DoesNotExist
> block. This doesn't work: if filter returns  we'll get an exception
> about list indices, not a DoesNotExist exception.
> Switch these over to get(), allowing them to use the existing exception
> Signed-off-by: Daniel Axtens <dja at axtens.net>
Damn. Good catch.
Reviewed-by: Stephen Finucane <stephenfinucane at hotmail.com>
More information about the Patchwork