implement "new catalog" in editor
This commit is contained in:
@ -139,9 +139,9 @@ class Catalog(models.Model):
|
||||
sections = 0
|
||||
pages = 0
|
||||
materials = 0
|
||||
for section in data.get('sections'):
|
||||
for section in data.get('sections', []):
|
||||
sections += 1
|
||||
for page in section.get('pages'):
|
||||
for page in section.get('pages', []):
|
||||
pages += 1
|
||||
for block in page:
|
||||
materials += len(block.get('ids', []))
|
||||
|
||||
Reference in New Issue
Block a user