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:
Aaron Mueller 2014-01-28 14:58:11 +01:00
parent 2ed50d75bc
commit ab395a49d7

View file

@ -22,12 +22,11 @@
(let [username (user/unique-user (:author fields))
competition-id (:id (competition/latest))]
(if-not (exists? (:ld_uid fields))
(insert entries (values {
:ld_uid (:ld_uid fields)
(insert entries (values {:ld_uid (:ld_uid fields)
:title (:title fields)
:description (:description fields)
:type (:type fields)
:user_id (:id username)
: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)))))