Skip to content

Conversation

@joystein
Copy link

@joystein joystein commented Mar 1, 2023

Summary

Adds a test which have none as one of the values in the dict given to event_properties of a BaseEvent. This test fails, while I wouldn't necessarily expect that. Is this a bug?

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@ethan-welysn
Copy link

I can confirm that attempting to create an event with event_properties= {"some_key": None} will result in an event with event_properties being equal to None. This feels like a bug to me.

event = BaseEvent(
    event_type="test_event", 
    user_id="test_user", 
    event_properties={'foo': 'bar', 'baz': None}
)
print(event.event_properties) ---> None
print(event.get_event_body()) ---> {'event_type': 'test_event'}

@sheepsy90
Copy link

I agree with that - it seems that canceling out all data in a event because one value is not set seems confusing - at best.

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.

3 participants