def __exit__(self, exc, value, tb):
    for key in self.overrides.keys():
        old_value = self.old[key]
        if (old_value is NULL):
            delattr(self.instance, key)
        else:
            setattr(self.instance, key, old_value)
    self.instance.save()
def __exit__(self, exc, value, tb):
    for key in self.overrides.keys():
        old_value = self.old[key]
        if (old_value is NULL):
            delattr(self.instance, key)
        else:
            setattr(self.instance, key, old_value)
    self.instance.save()