Ignore:
Timestamp:
1 Nov 2011, 08:34:05 (13 years ago)
Author:
Henrik Bettermann
Message:

We have to create a real (deep) list copy of self.keys() when deleting items of self. Otherwise the deletion of some of the items might fail.

I have no idea how to write regression tests with justifiable expenditure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py

    r6839 r6980  
    4141        """Delete a course referrer denoted by its code.
    4242        """
    43         for key in self.keys():
     43        keys = list(self.keys()) # create list copy
     44        for key in keys:
    4445            if self[key].getCourseCode() != code:
    4546                continue
Note: See TracChangeset for help on using the changeset viewer.