Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

live_stream_events_service.performLiveStreamEventAction({'xsi_type': 'ActivateLiveStreamEvents'}, <Live_Streams_List>) executed and impacted all Live Streams configs #461

Open
piyush2508 opened this issue May 11, 2020 · 3 comments

Comments

@piyush2508
Copy link

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)

@piyush2508
Copy link
Author

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.

@piyush2508 piyush2508 changed the title Defined Variable not used, impacting changes to ALL LiveStreamEvents as all returned by default live_stream_events_service.performLiveStreamEventAction({'xsi_type': 'ActivateLiveStreamEvents'}, <Live_Streams_List>) executed and impacted all Live Streams configs May 11, 2020
@piyush2508
Copy link
Author

Expected Result: This Query should not execute.

@christopherseeley
Copy link
Member

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?

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

No branches or pull requests

2 participants