我有三个模型:客户、合同、报告
class Customer
pass
class Contract
customer = models.ForeignKey(Customer)
class Report
customer = models.ForeignKey(Customer)
contract = models.ForeignKey(Contract, null=True, blank=True, default=None)
在管理员中编辑报告时我想选择客户或合同,如果我选择合同客户必须设置为合同的客户