comparison gpp/gcalendar/admin.py @ 389:3fa61786abf1

Fixing #190; calendar admin always reports 1 event being approved.
author Brian Neal <bgneal@gmail.com>
date Sun, 20 Mar 2011 20:23:29 +0000
parents d77e0dc772ad
children 345825e6dcae
comparison
equal deleted inserted replaced
388:c3231af55778 389:3fa61786abf1
39 def approve_events(self, request, qs): 39 def approve_events(self, request, qs):
40 """ 40 """
41 Ratchets the selected events forward to the approved state. 41 Ratchets the selected events forward to the approved state.
42 Ignores events that aren't in the proper state. 42 Ignores events that aren't in the proper state.
43 """ 43 """
44 count = 0
44 for event in qs: 45 for event in qs:
45 count = 0
46 if event.status in self.pending_states: 46 if event.status in self.pending_states:
47 event.status = self.pending_states[event.status] 47 event.status = self.pending_states[event.status]
48 event.save() 48 event.save()
49 count += 1 49 count += 1
50 50