Avoid database writes on the frontend

If, for whatever reason, the database writes aren't initially successful, this could run repeatedly on the frontend and crash the site.
Merge pull request #209 from INN/db-writes

Avoid database writes on the frontend