Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoCoding: Don't override identifier type in set_data #180

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

janezd
Copy link
Collaborator

@janezd janezd commented Apr 23, 2024

Issue

Fixes #179.

In set_data, we have

        self.openContext(data)
        self.region_attr_changed()

region_attr_changed() is the callback for combo with the attribute, and it includes a heuristic for setting the identifier type, thus overriding the value from the context.

Besides, it calls commit, which is ugly - set_data was not calling commit on it's own because it called region_attr_changed, which does it. Forget about proper implementation of auto_commit...

Description of changes

Reorganize the callbacks, and use heuristics for setting the type only if type is not recovered from the context (i.e., when no context matches).

Somebody should write tests for this. If nobody does it before the next release, we can still accept the PR as it is (if it's correct), because the widget is rather untested anyway.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd force-pushed the geocoding-region-type branch from 7a8f826 to d85fb57 Compare November 22, 2024 16:10
@janezd janezd merged commit 2e0f377 into biolab:master Nov 22, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geocoding - Encode forgets Identifier type
1 participant