Changeset 17992


Ignore:
Timestamp:
21 Jan 2025, 19:51:52 (14 hours ago)
Author:
Henrik Bettermann
Message:

Start with n=1. Otherwise Kofa will break if the first record creation fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r17985 r17992  
    773773        if isinstance(self.context, ApplicantsContainer):
    774774            container_only = True
    775         n = 0
     775        n = 1
    776776        for result in results:
    777777            if container_only and result.__parent__ is not self.context:
    778778                continue
    779             n += 1
    780779            success, msg = result.createStudent(view=self)
    781780            if success:
    782781                created.append(result.applicant_id)
     782                n += 1
    783783            else:
    784784                failed.append(
     
    790790        self.flash(_('Finished.'))
    791791        grok.getSite()['configuration'].maintmode_enabled_by = None
    792         self.n = n
     792        self.n = n-1
    793793        self.successful = ', '.join(created)
    794794        self.failed = failed
Note: See TracChangeset for help on using the changeset viewer.