toastdriven/django-tastypie — pull request #1002 by bendemboski (2013-08-08 04:03:37+00:00)
Title: Fix behavior in case of missing required FK field

Even if passed a default value, getattr throws a DoesNotExist exception when getting a null fk field of a model. Using hasattr() first ensures that an ApiFieldError will be thrown in this case, as it should be.