mitsuhiko/flask-sqlalchemy — pull request #95 by insom (2012-08-08 10:50:06+00:00)
Title: Fix before_models_committed signal

As per #90 - I'm seeing the same thing; the signal never fires because `d` is always empty when it does. I originally added `before_{insert,update,delete}` event handlers, but it looks like `before_commit` fires before even they do.

The approach on this pull request is to introspect the session object and see what is queued to be committed. I've included tests done by @DazWorrall which originally failed but now pass and I believe cover what the documentation says this signal should do.