<commit_before>import string

class CellarDAO(object):

	#Init class with mongo database
	def __init__(self, database):
			self.db = database
			self.bottles = database.bottles

	#Get all bottles in cellar 
	def find_bottles(self):
		current_bottles = []
		for bottle in self.bottles.find():
			current_bottles.append({'name':bottle['name'], 'color':bottle['color'], 'year':bottle['year']})

		return current_bottles

	#Add new bottle of wine in cellar
	def insert_bottle(self, name, color, year):
		newbottle = {'name':name, 'color':color, 'year':year}
		self.bottle.insert(newbottle)<commit_msg>Fix bug to insert the bottle in mongoDB<commit_after>import string

class CellarDAO(object):

	#Init class with mongo database
	def __init__(self, database):
			self.db = database
			self.bottles = database.bottles

	#Get all bottles in cellar 
	def find_bottles(self):
		current_bottles = []
		for bottle in self.bottles.find():
			current_bottles.append({'name':bottle['name'], 'color':bottle['color'], 'year':bottle['year']})

		return current_bottles

	#Add new bottle of wine in cellar
	def insert_bottle(self, name, color, year):
		newbottle = {'name':name, 'color':color, 'year':year}
		self.bottles.insert(newbottle)
{'fraction_non_alphanumeric': 0.13267813267813267, 'fraction_numerical': 0.0, 'mean_word_length': 5.298969072164948, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5469076', 'n_tokens_mistral': 466, 'n_tokens_neox': 428, 'n_words': 106}