Adapt article_data return value to ModelTree standards

This commit is contained in:
Ludovic Stephan 2017-03-15 22:39:30 -03:00
parent 1570d9f494
commit fe6823fc7b

View file

@ -1349,11 +1349,14 @@ def kpsul_articles_data(request):
for article in articles:
articlelist.append({
'type': 'article',
'content': {
'id': article.id,
'name': article.name,
'price': article.price,
'stock': article.stock,
'category': {
},
'parent': {
'id': article.category.id,
'name': article.category.name,
}