diff --git a/lib/workload/stateless/stacks/workflow-manager/workflow_manager/serializers/base.py b/lib/workload/stateless/stacks/workflow-manager/workflow_manager/serializers/base.py index a0d59eb8..7470b0a0 100644 --- a/lib/workload/stateless/stacks/workflow-manager/workflow_manager/serializers/base.py +++ b/lib/workload/stateless/stacks/workflow-manager/workflow_manager/serializers/base.py @@ -13,6 +13,14 @@ def __init__(self, *args, camel_case_data=False, **kwargs): super().__init__(*args, **kwargs) self.use_camel_case = camel_case_data + def to_representation(self, instance): + representation = super().to_representation(instance) + + if self.use_camel_case: + return {to_camel_case(key): value for key, value in representation.items()} + return representation + + class OptionalFieldsMixin: def make_fields_optional(self):