Skip to content

Conversation

obfusk
Copy link

@obfusk obfusk commented Sep 16, 2023

The type here is incorrect. In _build_monitor_data(), the notificationIDList parameter is a list, which then gets converted to a dict in _convert_monitor_input().

The wrong type here doesn't actually affect anything as it is an empty dict and thus never processed in _convert_monitor_input(), as an empty list would have been as well.

    dict_notification_ids = {}
    if kwargs["notificationIDList"]:
        for notification_id in kwargs["notificationIDList"]:
            dict_notification_ids[notification_id] = True
    kwargs["notificationIDList"] = dict_notification_ids

But it's still technically the wrong type in that part of the code, and changing other parts of the code could result in that causing a bug at some point.

NB: I haven't tested this change yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant