@property
    def rows(self):

        if self.config['org_summary']:

            def prepare_processing_info(data):
                return {
                    'total': (data[1] + data[2]) - data[0],
                    'complete': 0
                }

            org_summary = self.config['org_summary'][0]
            total = org_summary.total_orgs
            avg_lead_time = org_summary.average_lead_time_in_days
            if avg_lead_time:
                avg_lead_time = "%.1f" % avg_lead_time

            endmonth = self.config['enddate'].month
            dg = DeliveryGroups(month=endmonth)

            rr_data = RandRSubmissionData(config=self.config).rows[0]
            delivery_data = DeliverySubmissionData(config=self.config).rows[0]

            submitting_group = dg.current_submitting_group(month=endmonth)
            processing_group = dg.current_processing_group(month=endmonth)
            delivery_group = dg.current_delivering_group(month=endmonth)

            (rr_complete, rr_total) = (rr_data.complete, rr_data.total) if rr_data else (0, 0)
            if delivery_data:
                (delivery_complete, delivery_total) = (delivery_data.complete, delivery_data.total)
            else:
                (delivery_complete, delivery_total) = (0, 0)

            processing_numbers = prepare_processing_info([total, rr_total, delivery_total])

            return {
                "processing_total": processing_numbers['total'],
                "processing_complete": processing_numbers['complete'],
                "submitting_total": rr_total,
                "submitting_complete": int(rr_complete),
                "delivery_total": delivery_total,
                "delivery_complete": int(delivery_complete),
                "delivery_group": delivery_group,
                "submitting_group": submitting_group,
                "processing_group": processing_group,
                "total": total,
                "avg_lead_time": avg_lead_time,
            }
        else:
            return None
dataset/ETHPy150Open dimagi/commcare-hq/custom/ilsgateway/tanzania/reports/mixins.py/DistrictSummaryData.rows/swapped operands of `-`