Small improvements for item_frequencies
This commit is contained in:
parent
ba59e498de
commit
fc460b775e
1 changed files with 3 additions and 1 deletions
|
|
@ -1572,8 +1572,10 @@ class QuerySet(object):
|
|||
field.forEach(function(item) {
|
||||
emit(item, 1);
|
||||
});
|
||||
} else {
|
||||
} else if (field) {
|
||||
emit(field, 1);
|
||||
} else {
|
||||
emit(null, 1);
|
||||
}
|
||||
}
|
||||
""" % dict(field=field)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue