Skip to content

Commit cc2656c

Browse files
authored
DGS-20678 Fix possible NPE in CSFLE executor (#1980)
* Fix None ref in CSFLE executor * Minor fix
1 parent e601b15 commit cc2656c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/confluent_kafka/schema_registry/rules/encryption/encrypt_executor.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ def configure(self, client_conf: dict, rule_conf: dict):
6868
else:
6969
self.client = DekRegistryClient.new_client(client_conf)
7070

71-
if rule_conf:
72-
if self.config:
71+
if self.config:
72+
if rule_conf:
7373
for key, value in rule_conf.items():
7474
v = self.config.get(key)
7575
if v is not None:
7676
if v != value:
7777
raise RuleError(f"rule config key already set: {key}")
7878
else:
7979
self.config[key] = value
80-
else:
81-
self.config = rule_conf
80+
else:
81+
self.config = rule_conf if rule_conf else {}
8282

8383
def type(self) -> str:
8484
return "ENCRYPT"

0 commit comments

Comments
 (0)