Fixing 404 on page view when using PostgreSQL #1849
Hi @gimelfarb thanks for taking the time to contribute to Ghost.
There will be a lot of people VERY happy that PG support is not lost in 0.4
Unfortunately, your pull request doesn't currently meet our contributing guidelines.
Please review the following things:
closes #1801 - adding fixBools method to `server/models/base.js` to convert bools to 1/0 to be consistent with MySQL & sqlite3 data providers (based on @ErisDS recommendation) - this in turn fixes the check in `server/controllers/frontend.js`, which does an explicit `post.page === 0` comparison (in pgsql this is a `boolean`, since the schema declares it as "bool" in `server/data/schema.js`, but MySQL/sqlite3 don't have concept of Boolean, only an integer or bit) - any model retrieved from persistence will pass through this (possible future refactoring is to combine fixBools & fixDates into one "canonicalize()" to have a single loop pass)