[WEB-5228] chore: IssueLink.DoesNotExist on crawl_work_item_link_title (#8003)
* chore: wrap IssueLink logic in a try-except block * chore: user logger.warning * fix: add id and url on the error message
This commit is contained in:
parent
e09d986497
commit
69fe581fd8
1 changed files with 6 additions and 2 deletions
|
|
@ -171,8 +171,12 @@ def fetch_and_encode_favicon(
|
|||
@shared_task
|
||||
def crawl_work_item_link_title(id: str, url: str) -> None:
|
||||
meta_data = crawl_work_item_link_title_and_favicon(url)
|
||||
issue_link = IssueLink.objects.get(id=id)
|
||||
|
||||
try:
|
||||
issue_link = IssueLink.objects.get(id=id)
|
||||
except IssueLink.DoesNotExist:
|
||||
logger.warning(f"IssueLink not found for the id {id} and the url {url}")
|
||||
return
|
||||
|
||||
issue_link.metadata = meta_data
|
||||
|
||||
issue_link.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue