Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug where user-points couldn't have NULL aux values

  • Loading branch information...
commit 4d7f039f1a11c18d531ee5906dbc97b2c60a2c77 1 parent f87358e
@trebb authored
Showing with 12 additions and 5 deletions.
  1. +1 −1  phoros.asd
  2. +11 −4 phoros.lisp
View
2  phoros.asd
@@ -21,7 +21,7 @@ interface. http://phoros.boundp.org"
;; There should be a corresponding git tag which marks the point this
;; version number becomes official.
- "13.2.2"
+ "13.2.3"
:licence ;goes with --licence output
"Copyright (C) 2010, 2011, 2012 Bert Burgemeister
View
15 phoros.lisp
@@ -823,13 +823,13 @@ ingredients for the URLs of the 256 nearest images."
(point-form
(format nil "SRID=4326; POINT(~S ~S ~S)"
longitude latitude ellipsoid-height))
- (aux-numeric-raw (cdr (assoc :aux-numeric data)))
+ (aux-numeric-raw (setf *t* (cdr (assoc :aux-numeric data))))
(aux-text-raw (cdr (assoc :aux-text data)))
(aux-numeric (if aux-numeric-raw
- (apply #'vector aux-numeric-raw)
+ (nullify-nil (apply #'vector aux-numeric-raw))
:null))
(aux-text (if aux-text-raw
- (apply #'vector aux-text-raw)
+ (nullify-nil (apply #'vector aux-text-raw))
:null))
(user-point-table-name
(user-point-table-name presentation-project-name)))
@@ -1224,7 +1224,14 @@ coordinates received, wrapped in an array."
((symbolp x) x)
(t (map (type-of x) #'nillify-null x))))
-
+(defun nullify-nil (x)
+ "Replace occurences of nil in nested sequence x by :null."
+ (cond ((null x) :null)
+ ((stringp x) x)
+ ((numberp x) x)
+ ((symbolp x) x)
+ (t (map (type-of x) #'nullify-nil x))))
+
(hunchentoot:define-easy-handler
(aux-local-linestring :uri "/phoros/lib/aux-local-linestring.json"
:default-request-type :post)
Please sign in to comment.
Something went wrong with that request. Please try again.