Do not try to fill None
Use case: videoob play on an unknown URL. The get_object(... , ['url']) would throw a FieldNotFound, when the right error should be video not found.
This commit is contained in:
parent
2822006104
commit
edf72dfb33
1 changed files with 2 additions and 0 deletions
|
|
@ -354,6 +354,8 @@ class BaseBackend(object):
|
|||
:param fields: what fields to fill; if None, all fields are filled
|
||||
:type fields: :class:`list`
|
||||
"""
|
||||
if obj is None:
|
||||
return obj
|
||||
|
||||
def not_loaded(v):
|
||||
return (v is NotLoaded or isinstance(v, CapBaseObject) and not v.__iscomplete__())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue