MCPcopy
hub / github.com/apache/caldera / update_object

Method update_object

app/api/v2/managers/base_api_manager.py:87–92  ·  view source on GitHub ↗
(self, obj: Any, data: dict)

Source from the content-addressed store, hash-verified

85 return new_obj
86
87 def update_object(self, obj: Any, data: dict):
88 dumped_obj = obj.schema.dump(obj)
89 for key, value in dumped_obj.items():
90 if key not in data:
91 data[key] = value
92 return self.replace_object(obj, data)
93
94 def replace_object(self, obj: Any, data: dict):
95 new_obj = obj.schema.load(data)

Callers 1

Calls 1

replace_objectMethod · 0.95

Tested by

no test coverage detected