Comment 7 for bug 1702527

Revision history for this message
Mike Pontillo (mpontillo) wrote :

This DoesNotExist exception seems to be occurring due to Django's behavior of implicitly fetching a related object. In this case, we're trying to recalculate the usage of the subnet when the *IP address* that existed on the now-delete subnet is removed. Django believes there to be a subnet related to the IP address, since the subnet is not None, and tries to fetch it. But since it has been deleted, this race condition occurs.

I feel like this is arguably a bug in Django, but we'll have to handle it ourselves.