diff options
| author | Tom Christie | 2013-08-23 16:10:20 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-08-23 16:10:20 +0100 |
| commit | 10d386ec6a4822402b5ffea46bdd9e7d72db519b (patch) | |
| tree | 80ef9f700c1ee8e2bdb5c769edabb432bb763329 /rest_framework/relations.py | |
| parent | b72a99fef2c84428240425ed42b1a0b1198631b1 (diff) | |
| download | django-rest-framework-10d386ec6a4822402b5ffea46bdd9e7d72db519b.tar.bz2 | |
Cleanup and dealing with empty form data.
Diffstat (limited to 'rest_framework/relations.py')
| -rw-r--r-- | rest_framework/relations.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 7408758e..3ad16ee5 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -244,6 +244,8 @@ class PrimaryKeyRelatedField(RelatedField): source = self.source or field_name queryset = obj for component in source.split('.'): + if queryset is None: + return [] queryset = get_component(queryset, component) # Forward relationship |
