Skip to content
Snippets Groups Projects
Commit e3ecede0 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix: Allowing existing names on existing pois

parent d5b6a00e
No related branches found
No related tags found
No related merge requests found
......@@ -595,7 +595,8 @@ public class PointOfInterestController extends HttpServlet {
{
FormValidation formValidation = FormValidator.validateForm("poiForm", request, getServletContext());
Boolean poiNameAlreadyExists = SessionControllerGetter.getPointOfInterestBean().getPointOfInterest(formValidation.getFormField("name").getWebValue()) != null;
if(formValidation.isValid() && ! poiNameAlreadyExists)
// Only store if valid form data and NOT a new poi with an existing poiName
if(formValidation.isValid() && !(poi.getPointOfInterestId() == null && poiNameAlreadyExists))
{
// Set values
poi.setName(formValidation.getFormField("name").getWebValue());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment