mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Fix populate to work with Postgres
This commit is contained in:
@ -50,13 +50,10 @@ class Club(models.Model):
|
||||
self.check_loop()
|
||||
|
||||
def save(self):
|
||||
super(Club, self).save()
|
||||
try:
|
||||
if self.id is None:
|
||||
MetaGroup(name=self.unix_name+settings.SITH_BOARD_SUFFIX).save()
|
||||
MetaGroup(name=self.unix_name+settings.SITH_MEMBER_SUFFIX).save()
|
||||
except IntegrityError as e:
|
||||
# Groups already exists
|
||||
pass
|
||||
super(Club, self).save()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
Reference in New Issue
Block a user