Request.get_dict currently uses the class variable of self._nullable despite creating a local variable nulled from the Request.get_nulled method. This passes all nullable fields to the get_dict method and leaves them missing from the returned dict.
Currently, the default nullable parameter in util.todict is set to an empty list which is a mutable object. This doesn't currently cause any issues.
I have set it to None, then check if it's equal to None before creating it, as mentioned here:
https://docs.python.org/3/reference/compound_stmts.html#function-definitions
Request.get_dict currently uses the class variable of self._nullable despite creating a local variable nulled from the Request.get_nulled method. This passes all nullable fields to the get_dict method and leaves them missing from the returned dict.
Currently:
With the fix:
Currently, the default nullable parameter in util.todict is set to an empty list which is a mutable object. This doesn't currently cause any issues. I have set it to None, then check if it's equal to None before creating it, as mentioned here: https://docs.python.org/3/reference/compound_stmts.html#function-definitions