correct bug with duplicate university names and scraper bad encoding
from json import dumps
from django.contrib.auth.decorators import login_required
-from django.core.exceptions import ValidationError, ObjectDoesNotExist
+from django.core.exceptions import ValidationError, ObjectDoesNotExist, MultipleObjectsReturned
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login as auth_login
@@ -259,6 +259,8 @@ def update_user_profile(request):
except ObjectDoesNotExist:
new_term = UncategorizedTerm(name=dict_item)
new_term.save()
+ except MultipleObjectsReturned:
+ pass
profile_form = UserProfileForm(post_data_dict, request.FILES, instance=user_profile)
try:
