Fix #1007 - get location object not string of location name; caused 500 when editing...
authorJessica Tallon <jessica@megworld.co.uk>
Mon, 27 Oct 2014 11:11:43 +0000 (11:11 +0000)
committerJessica Tallon <jessica@megworld.co.uk>
Mon, 27 Oct 2014 11:11:43 +0000 (11:11 +0000)
mediagoblin/edit/views.py

index 30a32a7e36fa6701e19e3ffb939f43c50c78e67e..97e33e6a0215aba36b8176e424a915b89db7a543 100644 (file)
@@ -221,7 +221,7 @@ def edit_profile(request, url_user=None):
         if form.location.data and user.location is None:
             user.get_location = Location(name=unicode(form.location.data))
         elif form.location.data:
-            location = user.get_location.name
+            location = user.get_location
             location.name = unicode(form.location.data)
             location.save()