File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -286,16 +286,16 @@ def save(self, force=True) -> bool:
286286 else :
287287 data = self ._serialize ()
288288
289+ # Hack to minimize PUT contents to the configured json_class_options schema
289290 for key , value in data .items ():
290- key_property = getattr (type (self ).properties , key , None )
291- if key_property is None :
291+ if value is None or key not in type (self ).properties :
292292 continue
293293
294- json_class = key_property . json_class
295- if json_class is None :
294+ json_class_options = type ( self ). properties [ key ]. json_class_options
295+ if json_class_options is None :
296296 continue
297297
298- data [key ] = json_class .from_json (value ).dict
298+ data [key ] = json_class_options .from_json (value ).dict
299299
300300 resp = self ._client .put (type (self ).api_endpoint , model = self , data = data )
301301
You can’t perform that action at this time.
0 commit comments