Commits

Scott Nixon committed c855807 Draft

Fixed api bug with null measurement fields.

Comments (0)

Files changed (1)

article/api/views.py

 
 class RecipeIngredientResource(ModelResource):
     ingred_name = fields.ToOneField('article.api.views.IngredientResource', 'ri_ingred', full=True)
-    measurement = fields.ToOneField('article.api.views.MeasurementResource', 'ri_measurement', full=True)
+    measurement = fields.ToOneField('article.api.views.MeasurementResource', 'ri_measurement', full=True, null=True)
 
     class Meta:
         queryset = RecipeIngredient.objects.all()