From: Guillaume Pellerin Date: Mon, 12 Jan 2015 23:30:44 +0000 (+0100) Subject: fix location and ethnicgroup export X-Git-Tag: 1.5.0rc6~30 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=13d36cf92489fb7b67885ab42ed4426b39c3ba95;p=telemeta.git fix location and ethnicgroup export --- diff --git a/telemeta/models/media.py b/telemeta/models/media.py index 3f6f9b91..9378219b 100644 --- a/telemeta/models/media.py +++ b/telemeta/models/media.py @@ -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())