Open draggeta opened 1 year ago
So what you are proposing is to have an attribute on a model that decides what the direction of the sync should be? As in, you instantiate both of your DiffSync
subclass instances, and then instead of calling sync_from
or sync_to
, your proposal is to just call something like diffsync_a.sync(diffsync_b)
and have each individual model decide which record "wins"?
Hi @Kircheneer,
It could be a sync
method or a call to sync_to
or sync_from
, where diffsync will use the same property to check if it should overwrite the destination (or not).
Environment
Proposed Functionality
I do not know if this is possible with a custom diff, but I would love to have the capability to check if items should be synchronized based on a value like modified date.
Use Case
Basically if an object looks like this:
I'd like to be able to decide which side wins (if there is a diff) based on the
modified_date
. This would mean thatmodified_date
is ignored in the diff unless there is a difference. In those cases it will be the tiebreaker.