From 2679b1c7cbd6827718b911d5ef2e02729698a34f Mon Sep 17 00:00:00 2001
From: ppc19 <ppc19@inf.ufpr.br>
Date: Tue, 24 Aug 2021 11:12:23 -0300
Subject: [PATCH] fix insert function

---
 database/actions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/database/actions.py b/database/actions.py
index cb83c29..ec5302f 100644
--- a/database/actions.py
+++ b/database/actions.py
@@ -51,8 +51,8 @@ def temporary_data(connection, file_name, table, year, offset=2,
     ttable.create(bind=connection)
 
     table.populate_temporary(ttable, file_name, header, year, delimiters, null, offset, bind=connection)
-    if len(table._derivatives) != 0:
-        table.apply_derivatives(ttable, ttable.columns.keys(), year, bind=connection)
+
+    table.apply_derivatives(ttable, ttable.columns.keys(), year, bind=connection)
     table.add_pk_to_temporary(ttable, bind=connection)
 
     return ttable
-- 
GitLab