-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] Select Rows: Fix crash on changed variable type #4254
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #4254 +/- ##
==========================================
+ Coverage 86.23% 86.24% +<.01%
==========================================
Files 396 396
Lines 70666 70714 +48
==========================================
+ Hits 60940 60988 +48
Misses 9726 9726 |
janezd
force-pushed
the
select-rows-change-vartype
branch
from
December 6, 2019 13:54
f7090db
to
fd2ba3a
Compare
VesnaT
requested changes
Dec 13, 2019
Orange/widgets/data/owselectrows.py
Outdated
@@ -105,6 +124,8 @@ class Outputs: | |||
purge_classes = Setting(False, schema_only=True) | |||
auto_commit = Setting(True) | |||
|
|||
settings_version = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should'n this be set to 2?
Orange/widgets/data/owselectrows.py
Outdated
# | ||
# @classmethod | ||
# def migrate_context(cls, context, version): | ||
# if not version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if version is None or version < 2:
janezd
force-pushed
the
select-rows-change-vartype
branch
4 times, most recently
from
December 13, 2019 13:04
0ecff3e
to
fa537b1
Compare
VesnaT
approved these changes
Dec 14, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #3952. Widget's settings stored variable names without type, and retrieved settings that did not really match.
Description of changes
Add variable types to settings.
Previous settings are not migrated because we cannot guess variable types in migration. A possible workaround would be to skip migration and instead add specific code for handling old settings indecode_setting
andmatch
.Settings are not migrated; what crashed will still crash, but the only way to prevent this would be to clear settings entirely, which would harm more users than letting the widget crash for the few users who have existing settings and will change variables types.
Includes