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

List index out of range when reschedule a survey #4730

Closed
Atisom opened this issue Nov 29, 2020 · 3 comments
Closed

List index out of range when reschedule a survey #4730

Atisom opened this issue Nov 29, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@Atisom
Copy link

Atisom commented Nov 29, 2020

Describe the bug
When we want to reschedule a survey, we got this error: "List index out of range"

Debian GNU/Linux 9 \n \l
$ indico -v
Indico v2.3.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://$siteurl/event/1037/manage/surveys/672/
  2. Click on 'Reschedule'
  3. Set the end date to 31/12/2020
  4. I got error message

Expected behavior
Reschedule the survey

Screenshots
image
image

Additional context
I got the error message:


{u'data': {u'get': {},
           u'headers': {'Accept': u'application/json, text/javascript, */*; q=0.01',
                        'Accept-Encoding': u'gzip, deflate, br',
                        'Accept-Language':
u'en-HU,en;q=0.9,hu-HU;q=0.8,hu;q=0.7,en-GB;q=0.6,en-US;q=0.5',
                        'Connection': u'keep-alive',
                        'Content-Length': u'101',
                        'Content-Type': u'application/x-www-form-urlencoded;
charset=UTF-8',
                        'Cookie': u'*****',
                        'Host': u'*****',
                        'Origin': u'*****',
                        'Referer':
u'*****',
                        'Sec-Fetch-Dest': u'empty',
                        'Sec-Fetch-Mode': u'cors',
                        'Sec-Fetch-Site': u'same-origin',
                        'User-Agent': u'*****',
                        'X-Csrf-Token': u'*****',
                        'X-Requested-With': u'XMLHttpRequest'},
           u'json': None,
           u'post': {'csrf_token': u'*****',
                     'end_dt': [u'01/12/2020', u'23:59'],
                     'start_dt': u'00:00'},
           u'url': {'confId': u'1037', 'survey_id': 672}},
 u'endpoint': u'surveys.schedule_survey',
 u'id': '63cdf57cc8a14986',
 u'ip': '*****',
 u'method': 'POST',
 u'referrer': '*****',
 u'rh': 'RHScheduleSurvey',
 u'time': '2020-11-29T18:57:10.461959',
 u'url': u'*****',
 u'user': {u'email': u'*****',
           u'id': 250,
           u'name': u'Attila Debreczeni'},
 u'user_agent': u'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/87.0.4280.66 Safari/537.36'}
@Atisom Atisom added the bug label Nov 29, 2020
@ThiefMaster
Copy link
Member

ThiefMaster commented Nov 29, 2020

I'll have a look tomorrow. Good timing, I planned to release 2.3.2 during one of the next days anyway, so that fix will make it in there.

My guess it that it happens because no data gets submitted for a disabled field, and we don't handle that in the backend.

@ThiefMaster ThiefMaster added this to the v2.3 milestone Nov 29, 2020
ThiefMaster added a commit that referenced this issue Nov 29, 2020
The time field was not disabled, so a single value got submitted,
breaking the code in the wtforms fields in the backend.

fixes #4730
@ThiefMaster ThiefMaster self-assigned this Nov 29, 2020
@ThiefMaster
Copy link
Member

Fixed :)

If you need to hotfix it on your instance, apply the datetime_widget.html change manually; the rest is just to make things cleaner.

@Atisom
Copy link
Author

Atisom commented Nov 30, 2020

Thank you, it works! :)

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

No branches or pull requests

2 participants