Changeset 7938 for main/waeup.kofa


Ignore:
Timestamp:
21 Mar 2012, 18:09:06 (13 years ago)
Author:
uli
Message:

Trying to understand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r7937 r7938  
    189189
    190190    def checkConstraints(self, obj, row, site):
    191         """Checks constraints the object must fulfill
    192         before being updated.
    193         """
    194         return False
     191        """Checks constraints the object must fulfill when being updated.
     192
     193        This method is not used in case of deleting or adding objects.
     194
     195        Returns error messages as strings in case of constraint
     196        problems.
     197        """
     198        return None
    195199
    196200    def updateEntry(self, obj, row, site):
     
    334338                    continue
    335339                update_errors = self.checkConstraints(obj, row, site)
    336                 if update_errors is not False:
     340                if update_errors is not None:
    337341                    num_warns += 1
    338342                    self.writeFailedRow(
Note: See TracChangeset for help on using the changeset viewer.