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

Uploading a XLSForm with empty labels throws IntegrityError #869

Closed
oliverroick opened this issue Oct 26, 2016 · 1 comment
Closed

Uploading a XLSForm with empty labels throws IntegrityError #869

oliverroick opened this issue Oct 26, 2016 · 1 comment

Comments

@oliverroick
Copy link
Member

Steps to reproduce the error

  • Create a new project
  • In the wizard, upload an XLSForm with empty labels
  • Finish the remaining steps in the wizards and save the project.

Actual behavior

Saving the project throws an IntegrityError. The field label_xlat in QuestionOption models can be an empty dict but not None. This line reads empty values to None, which leads to the exception. The line should read label_xlat=o.get('label_xlat', o.get('label', {})) instead.

Expected behavior

The form should be processed without throwing an exception.

@ian-ross
Copy link
Contributor

Agreed. Silly mistake. I'll fix it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants