mediaconnect: fix, actually fixing create_flow to allow no outputs argument (#5096)

This commit is contained in:
nickphbrown 2022-05-04 23:07:27 +01:00 committed by GitHub
parent 600ac8efa5
commit 147f52fedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class MediaConnectBackend(BaseBackend):
for index, _source in enumerate(flow.sources):
self._add_source_details(_source, flow_id, f"127.0.0.{index}")
for index, output in enumerate(flow.outputs):
for index, output in enumerate(flow.outputs or []):
if output.get("protocol") in ["srt-listener", "zixi-pull"]:
output["listenerAddress"] = f"{index}.0.0.0"

View File

@ -108,6 +108,7 @@ def test_create_flow_alternative_succeeds():
"SourcePriority": {"PrimarySource": "Source-B"},
"State": "ENABLED",
},
outputs=None,
)
response = client.create_flow(**channel_config)