Add nil guard to PG JSON example
This commit is contained in:
parent
c736a63382
commit
84fe3ea1af
1 changed files with 2 additions and 1 deletions
|
|
@ -241,7 +241,8 @@ containing JSON:
|
||||||
(let [type (.getType v)
|
(let [type (.getType v)
|
||||||
value (.getValue v)]
|
value (.getValue v)]
|
||||||
(if (#{"jsonb" "json"} type)
|
(if (#{"jsonb" "json"} type)
|
||||||
(with-meta (<-json value) {:pgtype type})
|
(when value
|
||||||
|
(with-meta (<-json value) {:pgtype type}))
|
||||||
value)))
|
value)))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue