From 45f63419226e0b7f12b6e01620a6a3eeee2a946e Mon Sep 17 00:00:00 2001 From: Philipp Rieth <49029755+PhilippRieth@users.noreply.github.com> Date: Fri, 12 Jan 2024 13:29:25 +1100 Subject: [PATCH] Changed object to dict conversion to included 'false' Boolean values; Only skip values which are actually 'None' --- cw_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cw_controller.py b/cw_controller.py index df0c861..c677df5 100644 --- a/cw_controller.py +++ b/cw_controller.py @@ -34,7 +34,7 @@ def _get(self): def _create(self, a_object): # Ideally take the_item and submit that as the user_data try: - clean_dict = {k: v for k, v in a_object.__dict__.items() if v} + clean_dict = {k: v for k, v in a_object.__dict__.items() if v is not None} except Exception as e: print(repr(e)) return False