def update_required(self, local, remote, remote_as_kwargs): if local.is_stub or local.name != remote.name or local.language != remote.language: return True if {g.uuid for g in local.groups.all()} != {g.uuid for g in remote.groups}: return True return not is_dict_equal(local.get_fields(), remote.fields, ignore_none_values=True)
def update_required(self, local, remote, remote_as_kwargs): if local.is_stub \ or local.name != remote.name \ or local.language != remote.language \ or local.is_blocked != remote.blocked \ or local.is_stopped != remote.stopped: return True if {g.uuid for g in local.groups.all()} != {g.uuid for g in remote.groups}: return True return not is_dict_equal(local.get_fields(), remote.fields, ignore_none_values=True)
def update_required(self, local, remote, remote_as_kwargs): if local.is_stub or local.name != remote.name or local.language != remote.language: return True if {g.uuid for g in local.groups.all()} != {g.uuid for g in remote.groups}: return True urn_diff = set(local.urns).symmetric_difference(set(remote.urns)) if urn_diff: return True return not is_dict_equal(local.get_fields(), remote.fields, ignore_none_values=True)
def update_required(self, local, remote, local_kwargs): if local.name != remote.name: return True if local.level != remote.level: return True if remote.parent: if not local.parent: return True elif local.parent.osm_id != remote.parent: return True return not is_dict_equal(json.loads(local.geometry), dict(type=remote.geometry.type, coordinates=remote.geometry.coordinates))
def update_required(self, local, remote, local_kwargs): if local_kwargs and local_kwargs["backend"] != local.backend: return False if local.name != remote.name: return True if local.level != remote.level: return True if remote.parent: if not local.parent: return True elif local.parent.osm_id != remote.parent.osm_id: return True geometry_dict = dict() if remote.geometry: geometry_dict = dict(type=remote.geometry.type, coordinates=remote.geometry.coordinates) return not is_dict_equal(json.loads(local.geometry), geometry_dict)
def update_required(self, local, remote, local_kwargs): if local_kwargs and local_kwargs['backend'] != local.backend: return False if local.name != remote.name: return True if local.level != remote.level: return True if remote.parent: if not local.parent: return True elif local.parent.osm_id != remote.parent.osm_id: return True geometry_dict = dict() if remote.geometry: geometry_dict = dict(type=remote.geometry.type, coordinates=remote.geometry.coordinates) return not is_dict_equal(json.loads(local.geometry), geometry_dict)