-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
class CmodelUseCases: | ||
from src.db.mongo import get_collection | ||
from src.interfaces.cmodels import CModelsInterface | ||
|
||
|
||
class CmodelUseCases: | ||
@staticmethod | ||
def model_information_in_db_to_compare(model_in_db: dict) -> dict: | ||
model_in_db.pop('_id') | ||
model_in_db.pop('inserted_at') | ||
model_in_db.pop('updated_at') | ||
return model_in_db | ||
def update_cmodels_collection(): | ||
db_connection, cmodels_coll = get_collection() | ||
cmodels_interface = CModelsInterface(db_connection, cmodels_coll) | ||
cmodels_interface.insert_all_cmodel_documents() |