get_all_variations: return an empty dict in the list if there are no

properties
This commit is contained in:
Raphael Michel
2014-10-06 14:26:58 +02:00
parent 5e04dd4e9f
commit 495b7a9ce0
2 changed files with 3 additions and 1 deletions

View File

@@ -555,6 +555,7 @@ class Item(models.Model):
result = []
for comb in product(*[prop.values.all() for prop in all_properties]):
if len(comb) == 0:
result.append({})
continue
key = []
var = {}