change of comparison report of 4 model update
This commit is contained in:
@@ -87,7 +87,7 @@ class ManholeExcavationClient(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"):
|
||||
@@ -95,5 +95,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(ManholeExcavationClient, "before_insert", calculate_Manhole_total)
|
||||
event.listen(ManholeExcavationClient, "before_update", calculate_Manhole_total)
|
||||
Reference in New Issue
Block a user