Skip to content

Group with empty member list violates spec? #105

Description

@dcollien

I've noticed LRS.io (Veracity LRS) does not accept statements from this library which has an "empty list" for the member field of a Group (as is the default in this implementation), it only allows member lists with one or more element, or with the member field missing.

I've patched my own version of group.py to accept None as the default for member rather than empty list (which ends up being omitted) to work around this, but perhaps this could be the default on this implementation too.

    def __init__(self, *args, **kwargs):
        self._object_type = None
        self._member = None

        super(Group, self).__init__(*args, **kwargs)

    def addmember(self, value):
        if self._member is None:
            self._member = AgentList()
        # ... etc.

    @member.setter
    def member(self, value):
        if value is None:
            self._member = None
        else:
           # ... etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions