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

Don't check for dynamic label if there is no label #535

Merged
merged 1 commit into from
May 13, 2021

Conversation

lognaturel
Copy link
Contributor

@lognaturel lognaturel commented Apr 22, 2021

Closes #532

Why is this the best possible solution? Were any other approaches considered?

This is a quick prevention of the crash. I think we should also consider #534.

I also added a couple of tests around numeric choice names because I initially thought that might be the issue and it does seem like something that could regress.

What are the regression risks?

It's an added None check only so I don't believe there are any.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • included test cases for core behavior and edge cases in tests_v1
  • run nosetests and verified all tests pass
  • run black pyxform to format code
  • verified that any code or assets from external sources are properly credited in comments

@lognaturel
Copy link
Contributor Author

@gushil would you be up for a review? This is a fix for #521 which assumed labels were required.

Copy link
Contributor

@gushil gushil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm Ok with these changes.
No test for dynamic labels here because they're already tested in, for example, #521 right?

@lognaturel lognaturel merged commit ae7777c into XLSForm:master May 13, 2021
@lognaturel
Copy link
Contributor Author

No test for dynamic labels here because they're already tested in, for example, #521 right?

That's right.

@lognaturel lognaturel deleted the empty-label branch May 13, 2021 20:02
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.

Choice items without labels crash in pyxform v1.5 instead of leading to Validate error
2 participants