Fix calling len() on singular Submission / Comment instances.

master
Ethan Dalool 2017-12-05 08:31:14 -08:00
parent d1e68a0816
commit 6b4b6040be
1 changed files with 1 additions and 1 deletions

View File

@ -203,9 +203,9 @@ class TSDB:
return cls(filepath=filepath, do_create=do_create)
def insert(self, objects, commit=True):
common.log.debug('Trying to insert %d objects.', len(objects))
if not isinstance(objects, (list, tuple, types.GeneratorType)):
objects = [objects]
common.log.debug('Trying to insert %d objects.', len(objects))
new_values = {
'new_submissions': 0,