Revision 373daf6a snf-astakos-app/astakos/im/models.py

b/snf-astakos-app/astakos/im/models.py
113 113
    creation_date = models.DateTimeField('Creation date', default=datetime.now())
114 114
    issue_date = models.DateTimeField('Issue date', null=True)
115 115
    expiration_date = models.DateTimeField('Expiration date', null=True)
116
    moderatation_enabled = models.BooleanField('Moderated membership?', default=False)
116
    moderatation_enabled = models.BooleanField('Moderated membership?', default=True)
117 117
    approval_date = models.DateTimeField('Activation date', null=True, blank=True)
118 118
    estimated_participants = models.PositiveIntegerField('Estimated #participants', null=True)
119 119
    
......
153 153
        self.save()
154 154
    
155 155
    def approve_member(self, member):
156
        m = self.membership_set.get(person=member)
156
        m, created = self.membership_set.get_or_create(person=member, group=self)
157 157
        m.date_joined = datetime.now()
158 158
        m.save()
159
    
159
        
160 160
    def disapprove_member(self, member):
161 161
        m = self.membership_set.remove(member)
162 162
    

Also available in: Unified diff