Permalink
Browse files

Revert refactor of fetch-pastes

We rely on it to return #f in case of an empty result.
  • Loading branch information...
1 parent 323fedb commit 47a09cb75bfcd7fbce6a98e3b80524ccc1bb7fe1 @ckeen committed May 22, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 pastiche.scm
View
@@ -177,8 +177,9 @@
method: "post"))))
(define (fetch-paste id)
- (and id
- ($db "select * from pastes where hash=? order by time desc" values: (list id))))
+ (let ((r ($db "select * from pastes where hash=? order by time desc" values: (list id))))
+ (and id
+ (and (not (null? r)) r))))
(define (update-paste id snippet)
(insert-paste id snippet))

0 comments on commit 47a09cb

Please sign in to comment.