Add default logic to get merge data for object

This commit is contained in:
Lance Edgar 2023-01-14 12:17:05 -06:00
parent aef679c030
commit cfdaa1e927

View file

@ -2094,7 +2094,8 @@ class MasterView(View):
if self.merge_handler: if self.merge_handler:
return self.merge_handler.get_merge_preview_data(obj) return self.merge_handler.get_merge_preview_data(obj)
raise NotImplementedError("please implement `{}.get_merge_data()`".format(self.__class__.__name__)) return dict([(f, getattr(obj, f))
for f in self.get_merge_fields()])
def get_merge_resulting_data(self, remove, keep): def get_merge_resulting_data(self, remove, keep):
result = dict(keep) result = dict(keep)