Do not send error json to backend - it doesn’t need it and it creates bad data
This commit is contained in:
parent
3915d2a579
commit
f2e7feec1d
3 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ class Champs::CarteController < ApplicationController
|
|||
geo_areas = []
|
||||
geo_json = geo_json.blank? ? [] : JSON.parse(geo_json)
|
||||
|
||||
if geo_json.first == ["error", "TooManyPolygons"]
|
||||
if geo_json.empty?
|
||||
@error = true
|
||||
@champ.value = nil
|
||||
@champ.geo_areas = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue