From 631984a85c7b190328b9b83bfe0d585ca26d72cf Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 8 Jan 2021 04:12:23 +0100 Subject: [PATCH] Remove database initial insertion hack --- database/crud.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/database/crud.py b/database/crud.py index 5d7ea4a..6d83793 100644 --- a/database/crud.py +++ b/database/crud.py @@ -33,9 +33,8 @@ def create_database(data) -> None: """ models.Base.metadata.create_all(bind=engine) existing_row = search_database(data["correo_institucional"]) - if existing_row: - return - insert_data(data) + if not existing_row: + insert_data(data) def save_attribute(id, attribute, data) -> None: