bugfix: catch StaleDataError on updates
bugfix: turn off autoflush

This would sometimes cause deadlocking inside postgres, leading to
unexpected exceptions in the view.
add comment about autoflush
Merge pull request #41 from mark-burnett/fix-500-errors

Fix 500 errors