diff --git a/snipts/api.py b/snipts/api.py index 7440a5f..3cd87c7 100644 --- a/snipts/api.py +++ b/snipts/api.py @@ -41,8 +41,9 @@ class UserProfileValidation(Validation): return 'You must be a Pro to change these settings.' for field in bundle.data: - if not re.match('^[ A-Za-z0-9\/\@\._-]*$', bundle.data[field]): - errors[field] = 'Only spaces, letters, numbers, underscores, dashes, periods, forward slashes, and "at sign" are valid.' + if bundle.data[field]: + if not re.match('^[ A-Za-z0-9\/\@\._-]*$', bundle.data[field]): + errors[field] = 'Only spaces, letters, numbers, underscores, dashes, periods, forward slashes, and "at sign" are valid.' return errors diff --git a/templates/analytics.html b/templates/analytics.html index 45dd880..8bc9dfc 100644 --- a/templates/analytics.html +++ b/templates/analytics.html @@ -1,4 +1,4 @@ - +{% if not debug %} {% endif %} - {% if debug %} - - {% endif %} +{% else %} + +{% endif %}