change of comparison report of 4 model update

This commit is contained in:
2026-02-26 12:44:04 +05:30
parent cf7d1636f9
commit 568428b5d0
7 changed files with 114 additions and 28 deletions

View File

@@ -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)