500 Internal Server Error

'NoneType' object has no attribute 'id'