Skip to content

Commit 9e2d952

Browse files
committed
OKRS24-117 Replaced wildcard exception with exact one
1 parent a2f7545 commit 9e2d952

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/base/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from django.utils.translation import gettext_lazy as _
33
from linkpreview import LinkPreview, link_preview
44
from models_extensions.models import TimeStampedModel
5+
from requests.exceptions import HTTPError
56

67
from base.tools import get_class_by_name, split_class_name
78

@@ -118,7 +119,7 @@ def get_preview(self) -> LinkPreview:
118119
"""
119120
try:
120121
return link_preview(self)
121-
except Exception:
122+
except HTTPError:
122123
return {
123124
'description': _('No description available'),
124125
}

0 commit comments

Comments
 (0)