]> git.parisson.com Git - telemeta.git/commitdiff
fix location and ethnicgroup export
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 12 Jan 2015 23:30:44 +0000 (00:30 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 12 Jan 2015 23:30:44 +0000 (00:30 +0100)
telemeta/models/media.py

index 3f6f9b916c6e18f3ff3a5a336738c53ed7cae44d..9378219b74b35068080097282463bdee9cb55e17 100644 (file)
@@ -364,8 +364,8 @@ class MediaCollection(MediaResource):
         metadata = self.to_dict()
         metadata['url'] = get_full_url(reverse('telemeta-collection-detail', kwargs={'public_id':self.pk}))
         metadata['doc_status'] = self.document_status()
-        metadata['countries'] = ';'.join(self.main_countries())
-        metadata['ethnic_groups'] = ';'.join(self.ethnic_groups())
+        metadata['countries'] = ';'.join([location.name for location in self.main_countries()])
+        metadata['ethnic_groups'] = ';'.join([group.value for group in self.ethnic_groups()])
         metadata['last_modification_date'] = unicode(self.last_revision().time)
         metadata['computed_duration'] = unicode(self.computed_duration())
         metadata['computed_size'] = unicode(self.computed_size())