Fix calling len() on singular Submission / Comment instances.
This commit is contained in:
parent
d1e68a0816
commit
6b4b6040be
1 changed files with 1 additions and 1 deletions
|
@ -203,9 +203,9 @@ class TSDB:
|
||||||
return cls(filepath=filepath, do_create=do_create)
|
return cls(filepath=filepath, do_create=do_create)
|
||||||
|
|
||||||
def insert(self, objects, commit=True):
|
def insert(self, objects, commit=True):
|
||||||
common.log.debug('Trying to insert %d objects.', len(objects))
|
|
||||||
if not isinstance(objects, (list, tuple, types.GeneratorType)):
|
if not isinstance(objects, (list, tuple, types.GeneratorType)):
|
||||||
objects = [objects]
|
objects = [objects]
|
||||||
|
common.log.debug('Trying to insert %d objects.', len(objects))
|
||||||
|
|
||||||
new_values = {
|
new_values = {
|
||||||
'new_submissions': 0,
|
'new_submissions': 0,
|
||||||
|
|
Loading…
Reference in a new issue