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

Unit of Issue validation will fail if there are extraneous spaces #1494

Closed
jseppi opened this Issue Mar 16, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@jseppi
Contributor

jseppi commented Mar 16, 2017

@tram was sent a spreadsheet and screenshots that showed many invalid rows being detected.

The root cause turned out to be that the failing Unit of Issue fields had extra spaces at the end (eg, "Hour ").

Confusingly, I was not initially able to duplicate the problem in the current codebase from our develop branch. It turns out that Django 1.9, which we recently upgraded to
(#1466), automatically calls strip() on CharFields. Ref: https://docs.djangoproject.com/en/1.10/releases/1.9/#forms

However, the extract_hour_unit_of_issue coercer should still strip() on its own in order to allow the other variations of "hour" to pass validation when they have extra spaces (ie, "hourly " or "hours ").

@jseppi jseppi self-assigned this Mar 16, 2017

@jseppi jseppi added the in progress label Mar 16, 2017

@jseppi jseppi changed the title from Unit of Issue validation will fail if there are extranneous spaces to Unit of Issue validation will fail if there are extraneous spaces Mar 16, 2017

@jseppi

This comment has been minimized.

Contributor

jseppi commented Mar 16, 2017

extraneous n in my extranneous

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