[Fixed]-How to POST to server with null Related Resource in TastyPie?

1👍

I ended up figuring it out and it was a pretty dumb error. I just needed to add blank = True in addition to null = True:

class MissionResource(ModelResource):
    text_mission = fields.ToOneField('path.to.TextMissionResource', attribute='text_mission', related_name='mission', full = True, blank = True, null = True)

That got everything working properly.

Leave a comment