From 4e5ad8c17e1a288c875dff5f68d470fd639a6b78 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 4 Jan 2011 11:53:59 +0530 Subject: [PATCH] releasedate, genre --- pandora/item/models.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index d5d6274d..fd5c9994 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -279,7 +279,9 @@ class Item(models.Model): if 'countries' in data: data['country'] = data.pop('countries') if 'release date' in data: - data['releasedate'] = min(data.pop('release date')) + data['releasedate'] = data.pop('release date') + if isinstance(data['releasedate'], list): + data['releasedate'] = min(data['releasedate']) if 'plot' in data: data['summary'] = data.pop('plot') if isinstance(data['cast'][0], basestring): @@ -353,7 +355,7 @@ class Item(models.Model): 'year': 'year', 'runtime': 'runtime', - 'release_date': 'release_date', + 'releasedate': 'releasedate', 'country': 'country', 'director': 'director', @@ -362,7 +364,7 @@ class Item(models.Model): 'producer': 'producer', 'cinematographer': 'cinematographer', 'language': 'language', - 'genres': 'genre', + 'genre': 'genre', 'keyword': 'keyword', 'cast': 'cast', 'series_title': 'series_title',