forked from DGNum/gestioCOF
Adapt article_data return value to ModelTree standards
This commit is contained in:
parent
1570d9f494
commit
fe6823fc7b
1 changed files with 8 additions and 5 deletions
|
@ -1349,11 +1349,14 @@ def kpsul_articles_data(request):
|
||||||
|
|
||||||
for article in articles:
|
for article in articles:
|
||||||
articlelist.append({
|
articlelist.append({
|
||||||
'id': article.id,
|
'type': 'article',
|
||||||
'name': article.name,
|
'content': {
|
||||||
'price': article.price,
|
'id': article.id,
|
||||||
'stock': article.stock,
|
'name': article.name,
|
||||||
'category': {
|
'price': article.price,
|
||||||
|
'stock': article.stock,
|
||||||
|
},
|
||||||
|
'parent': {
|
||||||
'id': article.category.id,
|
'id': article.category.id,
|
||||||
'name': article.category.name,
|
'name': article.category.name,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue