diff --git a/src/gen/lib/baseobj.py b/src/gen/lib/baseobj.py index 4f7931008..f605462ca 100644 --- a/src/gen/lib/baseobj.py +++ b/src/gen/lib/baseobj.py @@ -73,6 +73,9 @@ class BaseObject: # Run through its own items patern_upper = pattern.upper() for item in self.get_text_data_list(): + # Some items are strings, which will fail in item.upper(), and some items are unicode. + # Convert all items to unicode and the item.upper().find(patern_upper) will work OK. + item = unicode(item) if not item: continue if case_sensitive: diff --git a/src/gen/lib/eventref.py b/src/gen/lib/eventref.py index 7db161bff..a12c8e8cc 100644 --- a/src/gen/lib/eventref.py +++ b/src/gen/lib/eventref.py @@ -94,7 +94,7 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase): @return: Returns the list of all textual attributes of the object. @rtype: list """ - return self.__role.string + return [self.__role.string] def get_text_data_child_list(self): """