Skip to content

The contact object witin Run object does not include urn, urn_display and annon_display #106

@merlos

Description

@merlos

The output in the runs API endpoint for the contact is this:

  "contact": {
                "uuid": "f7939441-...-...-1111-111111111",
                "name": null,
                "urn": "facebook:********",
                "urn_display": null,
                "anon_display": "000000000"
            },

However, the in the Run object of the client, only the uuid and the name are included.

I believe that the cause is that in the types.py file, within the Run class definition the contact is defined as an ObjectRef

class Run(TembaObject):
    ...
   contact = ObjectField(item_class=ObjectRef)
    ...

However, the ObjectRef only has name and uuid (also defined in types.py):

class ObjectRef(TembaObject):
    """
    Used for references to objects in other objects
    """

    uuid = SimpleField()
    name = SimpleField()

Potential solution:
A specific item_class may need to be defined.

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