I don't think this query is required. You can create a Django object by passing the id. Could you remove it?