EventParticipation: Bugfix in save() method
This commit is contained in:
parent
5639c5fd82
commit
6431764858
|
@ -133,7 +133,11 @@ class EventParticipation( models.Model ):
|
|||
return self.user.username
|
||||
|
||||
def save( self, *args, **kwargs ):
|
||||
prev = EventParticipation.objects.get( event = self.event, user = self.user )
|
||||
prev = EventParticipation.objects.filter( event = self.event, user = self.user )
|
||||
if len(prev) == 0:
|
||||
super(EventParticipation,self).save( *args,**kwargs)
|
||||
else:
|
||||
prev = prev[0]
|
||||
if prev.status != self.status or prev.comment != self.comment:
|
||||
super(EventParticipation,self).save( *args,**kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue