Fix failing creation in API

master
Nick Sergeant 2012-05-29 10:49:42 -04:00
parent fccf3025f7
commit d62c5cdff2
1 changed files with 4 additions and 2 deletions

View File

@ -186,6 +186,7 @@ class PrivateSniptResource(ModelResource):
bundle.data['tags_list'] = bundle.data.get('tags')
bundle.data['tags'] = ''
if 'blog_post' in bundle.data:
bundle = self._clean_publish_date(bundle)
return super(PrivateSniptResource, self).obj_create(bundle, request,
@ -199,6 +200,7 @@ class PrivateSniptResource(ModelResource):
bundle.data['tags_list'] = ''
bundle.data['tags'] = ''
if 'blog_post' in bundle.data:
bundle = self._clean_publish_date(bundle)
return super(PrivateSniptResource, self).obj_update(bundle, request,