googleads-python-lib
googleads-python-lib copied to clipboard
live_stream_events_service.performLiveStreamEventAction({'xsi_type': 'ActivateLiveStreamEvents'}, <Live_Streams_List>) executed and impacted all Live Streams configs
Variable Def -
Set ID of the LiveStreamEvent to get live stream events from.
LIVE_STREAM_EVENT_ID = 'INSERT_LIVE_STREAM_EVENT_ID_HERE'
Incorrect Usage - statement = (ad_manager.StatementBuilder(version='v202002') .Where(('Id = :id')) .WithBindVariable('id', int(live_stream_event_id)) .Limit(500))
Considering event id is not found via statement query will return all Live Streams and accidentally causing updateLiveStreamEvents to all LiveStreams
live_stream_events = live_stream_events_service.updateLiveStreamEvents( updated_live_stream_events)
https://github.com/googleads/googleads-python-lib/blob/41c17a88eabcac092592421a85c322132bf7e666/examples/ad_manager/v202002/live_stream_event_service/update_live_stream_events.py#L26
I re-checked, it seems the reason for this issue is not the above variable but when I executed below query:
live_stream_events_service.performLiveStreamEventAction({'xsi_type': 'ActivateLiveStreamEvents'}, <Live_Streams_List>)
Query executed and updated all live events in the network.
Is there a way to avoid this? to make sure API doesn't execute if valid query/format is not passed.
Expected Result: This Query should not execute.
So the request here is to validate that the parameter is able to be serialized to the xsi type rather than silently serializing as null?