更新时间:2023-01-30 10:27:50
您不能使用default
参数执行此操作.***的选择是覆盖save
方法:
You can't do this using the default
argument. The best bet is to override the save
method:
def save(self, *args, **kwargs):
if not self.id and not self.printable:
self.printable = self.link_fattura()
return super(Fattura, self).save(*args, **kwargs)