Bug 1075998 - Use soft deletion for add-on reviews, and allow admins to ...

...restore them.
On Wed, Nov 26, 2014 at 03:02:27AM -0800, Mathieu Agopian wrote:
>This looks scary and dangerous, and could cause many unforeseen side effects.

I don't think so. For one, we already do this elsewhere:

```python
                # Cope with soft deleted models.
                if hasattr(model, 'with_deleted'):
                    objs.extend(model.with_deleted.filter(pk=pk))
                else:
                    objs.extend(model.objects.filter(pk=pk))
```

For another, that attribute name is used consistently to hold a 
manager which returns the full set of actual objects, and isn't 
likely to be used for anything else. If it does turn out to fail 
for something, it's much more likely to fail noisily, rather 
than silently, as the method currently does for soft-deleted 
objects.

>In which cases does this fail mysteriously?

Whenever we're trying to operate on a soft-deleted object.

>Having a special case for reviews, where you would not use this 
>shortcut but the full version including `with_deleted` seems 
>safer

I think that having such a commonly-used method not fail 
silently and mysteriously on a common class of objects is less 
safe than having it deal gracefully with a fairly common corner 
case.