= commited on
Commit
df1b485
·
1 Parent(s): 2cb4802

modifying again the database manager

Browse files
send_and_retrieve_data.ipynb CHANGED
@@ -658,7 +658,7 @@
658
  },
659
  {
660
  "cell_type": "code",
661
- "execution_count": 1,
662
  "metadata": {},
663
  "outputs": [
664
  {
@@ -700,7 +700,7 @@
700
  " max_id = self.get_max_id(collection)\n",
701
  " \n",
702
  " # add the new sentences\n",
703
- " document['_id'] = max_id\n",
704
  " \n",
705
  " results = self.db[collection].insert_one(\n",
706
  " document\n",
 
658
  },
659
  {
660
  "cell_type": "code",
661
+ "execution_count": 2,
662
  "metadata": {},
663
  "outputs": [
664
  {
 
700
  " max_id = self.get_max_id(collection)\n",
701
  " \n",
702
  " # add the new sentences\n",
703
+ " document['_id'] = max_id + 1\n",
704
  " \n",
705
  " results = self.db[collection].insert_one(\n",
706
  " document\n",
wolof_translate/utils/database_manager.py CHANGED
@@ -27,7 +27,7 @@ class TranslationMongoDBManager:
27
  max_id = self.get_max_id(collection)
28
 
29
  # add the new sentences
30
- document['_id'] = max_id
31
 
32
  results = self.db[collection].insert_one(
33
  document
 
27
  max_id = self.get_max_id(collection)
28
 
29
  # add the new sentences
30
+ document['_id'] = max_id + 1
31
 
32
  results = self.db[collection].insert_one(
33
  document