I have a table that I need to do multiple nested if else it appears that only the last if else is used and field only gets populated with 15, there are some that meet the 25,35 and 45 but they don't get updated.
what am I doing wrong?
where = "AppType = 'SFR Active'"
with arcpy.da.UpdateCursor(table1, ["Field1","Field12","Field3","Field4","Field5", "Field6", "Field7","Field8"], where) as cursor:
for row in cursor:
#if row[0] is None:
#continue
if row[0] == "Approved" and row[1] == "Approved" and row[2] == "Approved" and row[3] is not None and row[4] == "Pass":
row[7] = 15
else:
row[7] = 0
if row[3] == "In_1" and row[4] == "Pass":
row[7] = 25
else:
row[7] = 15
if row[3] == "In_2" and row[4] == "Pass":
row[7] = 35
else:
row[7] = 25
if row[3] == "In_3" and row[4] == "Pass":
row[7] = 45
else:
row[7] = 35
cursor.updateRow(row)