catch attibute error when scrape missing schema
This commit is contained in:
parent
d75e39fbcd
commit
ca84da68c4
@ -16,7 +16,7 @@ def get_from_scraper(scrape, space):
|
||||
recipe_json = {}
|
||||
try:
|
||||
recipe_json['name'] = parse_name(scrape.title() or scrape.schema.data.get('name') or '')
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
recipe_json['name'] = ''
|
||||
|
||||
try:
|
||||
|
@ -11,8 +11,6 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
|
||||
"""
|
||||
import ast
|
||||
import os
|
||||
import random
|
||||
import string
|
||||
|
||||
from corsheaders.defaults import default_headers
|
||||
from django.contrib import messages
|
||||
|
Loading…
Reference in New Issue
Block a user