-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Sanitize newlines out of survey option inputs #4868
Conversation
Build succeeded.
|
Build succeeded.
|
075b707
to
911e049
Compare
Build succeeded.
|
02d6ce2
to
1dbe977
Compare
Build succeeded.
|
c46ff57
to
b602d46
Compare
Build succeeded.
|
b602d46
to
18f38bb
Compare
Build succeeded.
|
2633d15
to
54a15dd
Compare
Build failed.
|
54a15dd
to
6d5487d
Compare
Build succeeded.
|
6d5487d
to
cc7c9eb
Compare
Build succeeded.
|
…kes a string, splits it up, and then eliminates any extra newlines, or just accepts alist. Extra newlines are sanitized out. Signed-off-by: Rebeccah <rhunter@redhat.com>
))) | ||
# if it's a multiselect or multiple choice, it must have coices listed | ||
# choices and defualts must come in as strings seperated by /n characters. | ||
if qtype == 'multiselect' or qtype == 'multiplechoice': |
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.
nitpick, but meh, po-tay-to po-tah-to
if qtype in ['multiplechoice', 'multiselect']:
Build failed (gate pipeline). For information on how to proceed, see
|
have you rebased recently? anyone know what's up with
in the UI target? |
Yeah #4932 merged 4 hours ago and introduced the target easiest solution should be to rebase against the devel branch. |
cc7c9eb
to
7efacb6
Compare
@AlanCoding Darn, thought I had gotten those in before, rebased. |
Build succeeded.
|
regate |
Build succeeded.
|
backport for fix for sat6 plugin
SUMMARY
pertains to #4452
The main issue here was the playbook itself, which was fixed, however it did expose the ability for a blank newline to be added to a survey, which will break it.
My changes have added in multiple choice options parsing, which takes the string, splits it up, and then eliminates any extra newlines (which had lead to the blank lines mentioned above).
Additionally wrote a small validation to prevent the API pushing a default value for a survey that is not in the list of available options.
Additionally edited mixins.py to cover the same scenario in the UI not just the API, however the issue #4866 persists.
ISSUE TYPE
COMPONENT NAME
AWX VERSION