def __enter__(self):
    self.old = {}
    for (key, value) in self.overrides.items():
        self.old[key] = getattr(self.instance, key, NULL)
        setattr(self.instance, key, value)
    self.instance.save()
def __enter__(self):
    self.old = {}
    for (key, value) in self.overrides.items():
        self.old[key] = getattr(self.instance, key, NULL)
        setattr(self.instance, key, value)
    self.instance.save()