stephen_bailey
10/18/2021, 1:00 PMdef get_url_params(self, context=None, ...):
params: dict = {}
if context:
if context.get("channel_id"):
params["channel"] = context["channel_id"]
return params
visch
10/18/2021, 1:06 PMdef get_url_params(self, context=None, ...):
params: dict = {}
if context:
params["channel"] = context.get("channel_id", None)
return params
Makes it a little betteredgar_ramirez_mondragon
10/18/2021, 3:20 PMcontext.get("channel_id", None)
is a bit redundant, context.get("channel_id")
already defaults to None
visch
10/18/2021, 3:22 PMaaronsteers
10/18/2021, 5:48 PMdef get_url_params(self, context=None, ...):
params: dict = {}
if context and "channel_id" in context:
params["channel"] = context["channel_id"]
return params
stephen_bailey
10/18/2021, 5:56 PM"key" in my_dict
was a valid thing 🤯aaronsteers
10/18/2021, 8:52 PMstephen_bailey
10/18/2021, 11:56 PMif x and y
is conditional and only evaluates the second thing if the first is true. i was thinking that "channel_id" in context
would throw an error if context was not a dictvisch
10/19/2021, 12:11 AMaaronsteers
10/19/2021, 3:48 AM