Skip to content

Remove items from payload dictionary if their value is None #30

@Esterni

Description

@Esterni

Create class method from following code-block and apply to all functions so that they are removed from the URL query when sent to iRacing.

for key in payload.copy():
            if payload.get(key) is None:
                del(payload[key])
            else:
                pass

Functions need to be tested for proper functionality afterwards. It is known that a value of -1 is equal to the key being set to nothing key= but it is unknown if queries will still work if the key is removed entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions