Skip to content

Commit

Permalink
#287 - clean ticket data before saving it
Browse files Browse the repository at this point in the history
(cherry picked from commit c390e91)
  • Loading branch information
cbellone committed Nov 5, 2018
1 parent fa9171e commit 54656cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
import static java.util.stream.Collectors.toList;
import static org.apache.commons.lang3.StringUtils.trimToEmpty;

@Getter
public class AdminReservationModification implements Serializable {
Expand Down Expand Up @@ -78,9 +79,9 @@ public CustomerData(@JsonProperty("firstName") String firstName,
@JsonProperty("customerReference") String customerReference,
@JsonProperty("vatNr") String vatNr,
@JsonProperty("vatCountryCode") String vatCountryCode) {
this.firstName = firstName;
this.lastName = lastName;
this.emailAddress = emailAddress;
this.firstName = trimToEmpty(firstName);
this.lastName = trimToEmpty(lastName);
this.emailAddress = trimToEmpty(emailAddress);
this.billingAddress = billingAddress;
this.userLanguage = userLanguage;
this.customerReference = customerReference;
Expand Down Expand Up @@ -153,9 +154,9 @@ public Attendee(@JsonProperty("ticketId") Integer ticketId,
@JsonProperty("reference") String reference,
@JsonProperty("additionalInfo") Map<String, List<String>> additionalInfo) {
this.ticketId = ticketId;
this.firstName = firstName;
this.lastName = lastName;
this.emailAddress = emailAddress;
this.firstName = trimToEmpty(firstName);
this.lastName = trimToEmpty(lastName);
this.emailAddress = trimToEmpty(emailAddress);
this.language = language;
this.reassignmentForbidden = Optional.ofNullable(reassignmentForbidden).orElse(false);
this.reference = reference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h5><strong>Row specification</strong></h5>
<div class="col-xs-12 col-md-4">
<div class="form-group">
<label for="attendee-{{$index}}-emailAddress">E-Mail</label>
<input type="text" class="form-control" id="attendee-{{$index}}-emailAddress" required name="attendee-{{$index}}-emailAddress" ng-model="attendee.emailAddress">
<input type="email" class="form-control" id="attendee-{{$index}}-emailAddress" required name="attendee-{{$index}}-emailAddress" ng-model="attendee.emailAddress">
</div>
</div>
<div class="col-xs-12">
Expand Down

0 comments on commit 54656cb

Please sign in to comment.