Browse files

Work around Monger's collection/insert behavior

It sucks but it was too late to change it for 1.0
  • Loading branch information...
1 parent f0cc632 commit 96e7e7da24d1b43ff2d1fd21c31e75ab7a6d849c @michaelklishin michaelklishin committed Jun 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/refheap/models/paste.clj
@@ -288,10 +288,10 @@
result (mc/insert "pastes" doc)]
(if private
- (let [new (assoc result :paste-id (str (:_id result)))]
- (mc/update "pastes" result new)
+ (let [new (assoc doc :paste-id (str (:_id doc)))]
+ (mc/update "pastes" doc new)
- result)))))
+ doc)))))
(defn get-paste
"Get a paste."

0 comments on commit 96e7e7d

Please sign in to comment.