Fix the problem with not executing lazy sequences
See http://stackoverflow.com/questions/21387021/let-does-not-execute-the-second-expression-in-the-body for more information.
This commit is contained in:
parent
2ed50d75bc
commit
ab395a49d7
1 changed files with 2 additions and 3 deletions
|
@ -22,12 +22,11 @@
|
||||||
(let [username (user/unique-user (:author fields))
|
(let [username (user/unique-user (:author fields))
|
||||||
competition-id (:id (competition/latest))]
|
competition-id (:id (competition/latest))]
|
||||||
(if-not (exists? (:ld_uid fields))
|
(if-not (exists? (:ld_uid fields))
|
||||||
(insert entries (values {
|
(insert entries (values {:ld_uid (:ld_uid fields)
|
||||||
:ld_uid (:ld_uid fields)
|
|
||||||
:title (:title fields)
|
:title (:title fields)
|
||||||
:description (:description fields)
|
:description (:description fields)
|
||||||
:type (:type fields)
|
:type (:type fields)
|
||||||
:user_id (:id username)
|
:user_id (:id username)
|
||||||
:competition_id competition-id})))
|
:competition_id competition-id})))
|
||||||
(for [link (:links fields)]
|
(doseq [link (:links fields)]
|
||||||
(source/create! (:id (by-ld-uid (:ld_uid fields))) (:url link) (:title link)))))
|
(source/create! (:id (by-ld-uid (:ld_uid fields))) (:url link) (:title link)))))
|
||||||
|
|
Loading…
Reference in a new issue