Permalink
Browse files

Fixes paste updates, we no longer need to generate :_id with Monger 1.1

  • Loading branch information...
michaelklishin committed Jul 1, 2012
1 parent 291f8e4 commit 5a5c38bbe89e038291a859d74b201d41122f55f1
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/refheap/models/paste.clj
@@ -248,7 +248,6 @@
(let [[name {:keys [short]}] (lookup-lexer language)]
{:paste-id (str paste-id)
:id id
- :_id (ObjectId.)
:user (:id user)
:language name
:raw-contents contents
@@ -325,7 +324,7 @@
(:date old)
private
(:fork old))]
- (mc/update "pastes" old paste)
+ (mc/update "pastes" {:id (:id old)} paste :upsert false :multi false)
paste))))
(defn delete-paste

0 comments on commit 5a5c38b

Please sign in to comment.