def preprocess(self): self.is_locked_dict = {} for snapshot in self.sobjects: key = self.get_key(snapshot) is_locked = self.is_locked_dict.get(key) if is_locked == None: context = snapshot.get_value("context") try: parent = snapshot.get_parent() is_locked = Snapshot.is_locked(parent, context) self.is_locked_dict[key] = is_locked except SearchException as e: continue
def preprocess(my): my.is_locked_dict = {} for snapshot in my.sobjects: key = my.get_key(snapshot) is_locked = my.is_locked_dict.get(key) if is_locked == None: context = snapshot.get_value("context") try: parent = snapshot.get_parent() is_locked = Snapshot.is_locked(parent, context) my.is_locked_dict[key] = is_locked except SearchException, e: continue