📅  最后修改于: 2022-03-11 14:45:23.645000             🧑  作者: Mango
@receiver(pre_save, sender=A)
def signal_product_manage_latest_version_id(sender, instance, update_fields=None, **kwargs):
try:
old_instance = A.objects.get(id=instance.id)
except A.DoesNotExist: # to handle initial object creation
return None # just exiting from signal
# your code to with 'old_instance'