Gift Exchange: Prompts with no tagset (i.e. when no tags are allowed) break CSV download

Description

Steps to Reproduce:

  1. Create a new Gift Exchange.

  2. Open the challenge settings page.

  3. Set "Allowed" for all tags to 0.

  4. Make sure that at least one of "Description" or "URL" is enabled for both requests and offers. (Since the challenge sign-up form doesn't work properly when there are no fields to fill out.)

  5. Save the challenge settings.

  6. Sign up for your own gift exchange.

  7. Go to "Sign-ups (1)" in the sidebar.

  8. Click "Download (CSV)".

What Should Happen: You should be able to download a CSV file with your sign-up in it.

What Actually Happens: An error.

Notes: Prompts accept nested attributes for their tag sets. So if there are any fields on the sign-up form related to the tag set, even if those fields are left blank, the tag set will be created. But if there are no such fields – which happens when no tags are allowed – then the tag set never gets created and the prompt is saved without a tag set.

When that happens, the CSV download hits an error on this line:

(Source)

Environment

None

Assignee

Unassigned

Reporter

ticking instant

Roadmap

Challenges

Priority

Medium

Affects versions

Fix versions

None

Components

BackEnd

Difficulty

Medium

Required Access Level

None

Milestone

Internal 0.9
Configure