diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index 8166fa47..eb93be70 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -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: diff --git a/recipes/settings.py b/recipes/settings.py index 4f0b1c8d..59808f21 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -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