diff options
| author | Xinhui | 2016-09-19 10:35:11 +0200 |
|---|---|---|
| committer | Xinhui | 2016-09-19 11:04:42 +0200 |
| commit | ab934bcb678384926cc14742641af8bccb7fb0d1 (patch) | |
| tree | 2d660323cf51baf4e0ff292a0161d1dfdf2ea8fb | |
| parent | 1fd7842aa80bef57d92acfb60c63f9596ef345c1 (diff) | |
| download | chouette-core-ab934bcb678384926cc14742641af8bccb7fb0d1.tar.bz2 | |
Fix error 500 on stopArea edit form
| -rw-r--r-- | app/models/chouette/stop_area.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb index 9a2358348..3be815499 100644 --- a/app/models/chouette/stop_area.rb +++ b/app/models/chouette/stop_area.rb @@ -155,8 +155,10 @@ class Chouette::StopArea < Chouette::ActiveRecord def position=(position) position = nil if String === position && position == "" position = Geokit::LatLng.normalize(position), 4326 if String === position - self.latitude = position.lat - self.longitude = position.lng + if position + self.latitude = position.lat + self.longitude = position.lng + end end def default_position |
