1@receiver(pre_save, sender=A)
2def signal_product_manage_latest_version_id(sender, instance, update_fields=None, **kwargs):
3 try:
4 old_instance = A.objects.get(id=instance.id)
5 except A.DoesNotExist: # to handle initial object creation
6 return None # just exiting from signal
7 # your code to with 'old_instance'