]> git.parisson.com Git - telemeta.git/commitdiff
bugfix
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 15 Jan 2015 10:14:54 +0000 (11:14 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 15 Jan 2015 10:14:54 +0000 (11:14 +0100)
telemeta/models/media.py

index 38620113b1fae11efe8f4a77c0cc892aaef096c8..b2dff83232c7f910c9073d1612883757682a8668 100644 (file)
@@ -363,7 +363,7 @@ class MediaCollection(MediaResource):
         # metadata = model_to_dict(self, fields=[], exclude=self.exclude)
         metadata = self.to_dict()
         for key in self.exclude:
-            metadata.remove(key)
+            del metadata[key]
         metadata['url'] = get_full_url(reverse('telemeta-collection-detail', kwargs={'public_id':self.pk}))
         metadata['doc_status'] = self.document_status()
         metadata['countries'] = ';'.join([location.name for location in self.main_countries()])
@@ -594,7 +594,7 @@ class MediaItem(MediaResource):
         # metadata = model_to_dict(self, fields=[], exclude=self.exclude)
         metadata = self.to_dict()
         for key in self.exclude:
-            metadata.remove(key)
+            del metadata[key]
         metadata['url'] = self.get_url()
         metadata['last_modification_date'] = unicode(self.get_revision().time)
         metadata['collection'] = self.collection.get_url()