From 5434da22bc3070682e6628657bce24f5a0e5b560 Mon Sep 17 00:00:00 2001 From: Bobloy Date: Thu, 3 May 2018 11:45:12 -0400 Subject: [PATCH] better default --- chatter/chatterbot/storage/mongodb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chatter/chatterbot/storage/mongodb.py b/chatter/chatterbot/storage/mongodb.py index 06ced53..1ddb625 100644 --- a/chatter/chatterbot/storage/mongodb.py +++ b/chatter/chatterbot/storage/mongodb.py @@ -3,8 +3,11 @@ from chatter.chatterbot.storage import StorageAdapter class Query(object): - def __init__(self, query={}): - self.query = query + def __init__(self, query=None): + if query is None: + self.query = {} + else: + self.query = query def value(self): return self.query.copy()