Open gioccher opened 1 month ago
Interesting point. There is https://github.com/networktocode/diffsync/issues/25 which would address this, until then, if you need a quick fix for this, I recommend you do something like
class YourAdapter(NautobotAdapter):
...
def load(...):
return_value = super.load(...)
for obj in self.get_all("modelname"):
obj.field = sorted(obj.field, key=lambda o: o.trunk_groups)
self.update(obj)
return return_value
This should sort your values to be consistent - you need to change this such that it matches your other adapter, or change the other adapter, too.
This is an issue in ssot:contrib CustomRelationshipAnnotation with custom relationships items ordering
Environment
Expected Behavior
No changes are detected after running the sync a 2nd time
Observed Behavior
The same set of changes is detected running the sync multiple times. The only difference is the order of items in the custom relationship.
Steps to Reproduce