Ignore:
Timestamp:
30 Sep 2011, 08:14:18 (13 years ago)
Author:
Henrik Bettermann
Message:

Skip location and catalog fields, used to locate the object, when creating or updating the object.

File:
1 edited

Legend:

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

    r6831 r6833  
    175175        """Update obj to the values given in row.
    176176        """
     177        # Skip location and catalog fields used to locate the object
    177178        for key, value in row.items():
    178             setattr(obj, key, value)
     179            if hasattr(obj, key):
     180                setattr(obj, key, value)
    179181        return
    180182
     
    274276                    continue
    275277                obj = self.callFactory()
    276                 for key, value in row.items():
    277                     setattr(obj, key, value)
     278                self.updateEntry(obj, row, site)
    278279                try:
    279280                    self.addEntry(obj, row, site)
Note: See TracChangeset for help on using the changeset viewer.