[bugfix] Corrected postgres memory error (2h)

The postgres out-of-memory error seems to arise from too many saves failing validations. I circumvented this by not making a call to the database if the active record object was invalid.