Fix failing creation in API
parent
fccf3025f7
commit
d62c5cdff2
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue