File diff 6e37753fb313 → ab8559c75bdb
import2ledger/importers/benevity.py
Show inline comments
...
 
@@ -8,16 +8,16 @@ ZERO_DECIMAL = decimal.Decimal(0)
 
class _DonationsImporterBase(_csv.CSVImporterBase):
 
    NAME_FIELDS = ['Donor First Name', 'Donor Last Name']
 
    NOT_SHARED = 'Not shared by donor'
 

	
 
    @classmethod
 
    def _read_header_row(cls, row):
 
        row_len = len(row)
 
        if row_len > 2:
 
        row_rindex = cls._row_rindex(row, -1)
 
        if row_rindex > 1:
 
            return None
 
        elif row_len == 2 and row[0] in cls.HEADER_FIELDS:
 
        elif row_rindex == 1 and row[0] in cls.HEADER_FIELDS:
 
            return {cls.HEADER_FIELDS[row[0]]: row[1]}
 
        else:
 
            return {}
 

	
 
    def _read_row(self, row):
 
        date_s = row.get(self.DATE_FIELD)