carousel news item creation fix

This commit is contained in:
Kuroshini 2019-12-19 17:20:51 +03:00
parent 794ac84838
commit f884d8303f
2 changed files with 4 additions and 2 deletions

View File

@ -360,7 +360,9 @@ class NewsCarouselCreateSerializer(CarouselCreateSerializer):
def create(self, validated_data, *args, **kwargs): def create(self, validated_data, *args, **kwargs):
validated_data.update({ validated_data.update({
'content_object': validated_data.pop('news') 'content_object': validated_data.pop('news'),
'is_parse': True,
'active': True,
}) })
return super().create(validated_data) return super().create(validated_data)

View File

@ -14,5 +14,5 @@ urlpatterns = [
path('<int:pk>/gallery/<int:image_id>/', views.NewsBackOfficeGalleryCreateDestroyView.as_view(), path('<int:pk>/gallery/<int:image_id>/', views.NewsBackOfficeGalleryCreateDestroyView.as_view(),
name='gallery-create-destroy'), name='gallery-create-destroy'),
path('<int:pk>/carousels/', views.NewsCarouselCreateDestroyView.as_view(), name='create-destroy-carousels'), path('<int:pk>/carousels/', views.NewsCarouselCreateDestroyView.as_view(), name='create-destroy-carousels'),
path('<int:pk>/clone/<str:country_code>', views.NewsCloneView.as_view(), name='create-destroy-carousels'), path('<int:pk>/clone/<str:country_code>', views.NewsCloneView.as_view(), name='clone-news-item'),
] ]