On Thu, Dec 3, 2009 at 10:23 AM, Luke Plant <l.plant...@cantab.net> wrote: > On Thursday 03 December 2009 14:18:10 Waylan Limberg wrote: > >> Looking though this patch I couldn't help but notice the new >> get_messages function. What if a project has neither the >> MessageMiddleware nor the contrib.auth app enabled? Sure a reusable >> app could catch the error, but that error will change once all >> support for user.messages are removed in 1.4. Shouldn't the call >> to user.get_and_delete_messages be wrapped in a check that >> request.user exists like the new add_message function does? > > It is - the inline 'get_user()' function does effectively just that: >
Right. As Tobias pointed out, the get_and_delete_messages on AnonymousUser returns an empty list. That was the part I missed. Thanks for clearing that up. -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.