Modify Rule.send_to_targets() to handle event_bus_name as ARN (#3804)

* Modify Rule.send_to_targets() to handle event_bus_name as ARN

* Apply black formatting

Co-authored-by: Tom Noble <tom.noble@bjss.com>
This commit is contained in:
Tom Noble 2021-03-28 10:33:47 +00:00 committed by GitHub
commit f549f1d087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View file

@ -82,6 +82,7 @@ class Rule(CloudFormationModel):
self.targets.pop(index)
def send_to_targets(self, event_bus_name, event):
event_bus_name = event_bus_name.split("/")[-1]
if event_bus_name != self.event_bus_name:
return