def get_orphans(object_list, null_attribute):
    'Finds objects in a list which do not have a value in a specified field.\n\n    :param list object_list: a list of ArchivesSpace objects.\n    :param null_attribute: an attribute which must be empty or null.\n\n    :yields: a list of ArchivesSpace objects.\n    :yield type: dict\n    '
    for obj in object_list:
        if (getattr(obj, null_attribute) in ['', [], {}, None]):
            (yield obj)
Finds objects in a list which do not have a value in a specified field.

:param list object_list: a list of ArchivesSpace objects.
:param null_attribute: an attribute which must be empty or null.

:yields: a list of ArchivesSpace objects.
:yield type: dict
def get_orphans(object_list, null_attribute):
    'Finds objects in a list which do not have a value in a specified field.\n\n    :param list object_list: a list of ArchivesSpace objects.\n    :param null_attribute: an attribute which must be empty or null.\n\n    :yields: a list of ArchivesSpace objects.\n    :yield type: dict\n    '
    for obj in object_list:
        if (getattr(obj, null_attribute) in [, [], {}, None]):
            (yield obj)