Django: Assigning ForeignKey - Unable to get repr for class
问题 I ask this question here because, in my searches, this error has been generally related to queries rather than ForeignKey assignment. The error I am getting occurs in a method of a model. Here is the code: class Deal(models.Model): ...model_fields... def _update_existing_deal(self, deal_dict): #deal made from deal_dict here, psuedo code below deal = Deal(deal_dict) HistoricalDeal().create_historical_deal(deal) self.price = deal_dict.get('price', self.price) if self.comment != deal_dict.get[