diff --git a/addons/base/views.py b/addons/base/views.py index 6f142db5781..df093ca832e 100644 --- a/addons/base/views.py +++ b/addons/base/views.py @@ -277,6 +277,9 @@ def _get_authenticated_resource(resource_id): if resource.deleted: raise HTTPError(http_status.HTTP_410_GONE, message='Resource has been deleted.') + if getattr(resource, 'is_retracted', False): + raise HTTPError(http_status.HTTP_410_GONE, message='Resource has been retracted.') + return resource