Fix counter defaults on new model instances.
Review Request #2581 — Created Sept. 7, 2011 and submitted — Latest diff uploaded
Fix counter defaults on new model instances. On new models, counters were being initialized to 0, since the model didn't have a primary key set yet. This meant that we skipped any sort of calculations, resulting in counters simply being broken. Now we refuse to set a default, keeping it NULL, if it's a new model. The next load should then perform a proper calculation.
Tested with an accompanying Review Board change. Test passes.