Skip to content

Bug in Resource.__getattr__ #105

@samamorgan

Description

@samamorgan

If an key exists in a Resource, but that key is defined in Resource.nested_objects, and the value of that key is None, the following exception is raised:

TypeError: 'NoneType' object is not iterable

For example:

program = PatientProgram(currentPhase=None)
program.currentPhase

Traceback (most recent call last):
  TypeError: 'NoneType' object is not iterable

The workaround for now, is to just access the attribute using dict syntax: program["currentPhase"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions