From f9c351a98d8f389067447f0558b9b0fa803d198f Mon Sep 17 00:00:00 2001 From: ulas Date: Wed, 4 Dec 2019 19:28:53 +0300 Subject: [PATCH] propagate casing param recursively. --- betterproto/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/betterproto/__init__.py b/betterproto/__init__.py index cb9cd29..0e016f5 100644 --- a/betterproto/__init__.py +++ b/betterproto/__init__.py @@ -723,14 +723,14 @@ class Message(ABC): output[cased_name] = v elif isinstance(v, list): # Convert each item. - v = [i.to_dict() for i in v] + v = [i.to_dict(casing) for i in v] output[cased_name] = v elif v._serialized_on_wire: - output[cased_name] = v.to_dict() + output[cased_name] = v.to_dict(casing) elif meta.proto_type == "map": for k in v: if hasattr(v[k], "to_dict"): - v[k] = v[k].to_dict() + v[k] = v[k].to_dict(casing) if v: output[cased_name] = v