Skip to content

Commit

Permalink
Adding extra conditional to if broker statement to catch none type fi…
Browse files Browse the repository at this point in the history
…elds
  • Loading branch information
Ellen-Yi-Dong committed Feb 22, 2024
1 parent 1047587 commit b3fd67b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rbac/rbac/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
if not kafka_brokers:
raise ValueError("No kafka brokers available")
for broker in kafka_brokers:
if broker:
if broker and broker.hostname != None and broker.port != None:
kafka_host = broker.hostname
kafka_port = broker.port
kafka_info = f"{kafka_host}:{kafka_port}"
Expand Down

0 comments on commit b3fd67b

Please sign in to comment.