Browse files

Fix to broken logic in SaveDocument() that caused unit test to go red…

…. Alex, run the unit tests! :)
  • Loading branch information...
1 parent 2bbe608 commit c72aa7d34a2052c8c4a74e7f5a39b1beadb793de @gokr gokr committed Dec 1, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/CouchDatabase.cs
View
6 src/CouchDatabase.cs
@@ -223,9 +223,9 @@ public ICouchDocument SaveDocument(ICouchDocument document)
try
{
if (document.Id == null)
- CreateDocument(document);
-
- savedDoc = WriteDocument(document);
+ savedDoc = CreateDocument(document);
+ else
+ savedDoc = WriteDocument(document);
}
catch (CouchConflictException ex)
{

0 comments on commit c72aa7d

Please sign in to comment.