change of comparison report of 4 model update
This commit is contained in:
@@ -70,7 +70,7 @@ class ManholeExcavation(db.Model):
|
||||
# ==========================================
|
||||
# AUTO CALCULATE GRAND TOTAL
|
||||
# ==========================================
|
||||
def calculate_trench_total(mapper, connection, target):
|
||||
def calculate_Manhole_total(mapper, connection, target):
|
||||
total = 0
|
||||
for column in target.__table__.columns:
|
||||
if column.name.endswith("_total"):
|
||||
@@ -78,5 +78,5 @@ def calculate_trench_total(mapper, connection, target):
|
||||
target.Total = total
|
||||
|
||||
|
||||
event.listen(TrenchExcavation, "before_insert", calculate_trench_total)
|
||||
event.listen(TrenchExcavation, "before_update", calculate_trench_total)
|
||||
event.listen(ManholeExcavation, "before_insert", calculate_Manhole_total)
|
||||
event.listen(ManholeExcavation, "before_update", calculate_Manhole_total)
|
||||
Reference in New Issue
Block a user