Fix news patch
This commit is contained in:
parent
396921fa75
commit
0da58133fc
|
|
@ -214,12 +214,12 @@ class NewsBackOfficeBaseSerializer(NewsBaseSerializer):
|
|||
'active': True,
|
||||
'inactive': False,
|
||||
}
|
||||
attrs['slugs'] = {obj['locale']: obj['slug'] for obj in descriptions}
|
||||
attrs['title'] = {obj['locale']: obj['title'] for obj in descriptions}
|
||||
attrs['slugs'] = {obj['locale']: obj['slug'] for obj in descriptions if 'slug' in obj}
|
||||
attrs['title'] = {obj['locale']: obj['title'] for obj in descriptions if 'title' in obj}
|
||||
attrs['locale_to_description_is_active'] = {
|
||||
obj['locale']: status_to_bool[obj['status']] for obj in descriptions
|
||||
}
|
||||
attrs['description'] = {obj['locale']: obj['text'] for obj in descriptions}
|
||||
attrs['description'] = {obj['locale']: obj['text'] for obj in descriptions if 'text' in obj}
|
||||
return attrs
|
||||
|
||||
def create(self, validated_data):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user