Fix #1049 - name renamed to displayName for Location
authorJessica Tallon <jessica@megworld.co.uk>
Fri, 5 Dec 2014 14:03:52 +0000 (14:03 +0000)
committerJessica Tallon <jessica@megworld.co.uk>
Fri, 5 Dec 2014 14:04:18 +0000 (14:04 +0000)
mediagoblin/db/models.py

index 7afd428d98c6ba8b5ce0d626982581c0a93a02f0..98a91ccc6a427a5fa9e6dbf7095b0be57a6b90fc 100644 (file)
@@ -70,7 +70,7 @@ class Location(Base):
         location = {"objectType": "place"}
 
         if self.name is not None:
-            location["name"] = self.name
+            location["displayName"] = self.name
 
         if self.position:
             location["position"] = self.position
@@ -81,8 +81,8 @@ class Location(Base):
         return location
 
     def unserialize(self, data):
-        if "name" in data:
-            self.name = data["name"]
+        if "displayName" in data:
+            self.name = data["displayName"]
 
         self.position = {}
         self.address = {}