PlayWithMagic / PlayWithMagic.org

PlayWithMagic.org is a web application that catalogs magic tricks and helps magicians build shows.
http://playwithmagic.github.io/PlayWithMagic.org/
Apache License 2.0
2 stars 1 forks source link

Show Email input does not function on NewMagician page. #99

Closed pkarjala closed 9 years ago

pkarjala commented 9 years ago

When the Show Email option is checked, it throws an error on submit.

[InvalidPropertyException: Invalid property 'showEmail[0]' of bean class [views.formdata.MagicianFormData]: Property referenced in indexed property path 'showEmail[0]' is neither an array nor a List nor a Map; returned value was [Show Email]]

In /Users/patrick/ics613/PlayWithMagic/app/controllers/Application.java:66

63   * @return The NewMagician page, either with errors or success.
64   */
65  public static Result postMagician() {
66    Form<MagicianFormData> formData = Form.form(MagicianFormData.class).bindFromRequest();
67    if (formData.hasErrors()) {
68      System.out.println("HTTP Form Error.");
69      return badRequest(NewMagician.render(formData, ExperienceLevels.getExperienceLevels(),
70          ShowEmail.getShowMyEmail()));
71    }
pkarjala commented 9 years ago

This is linked to #95; if we can implement that instead, it will likely be cleaner.

pkarjala commented 9 years ago

Resolved by removing Show Email; we will not display a user's email.