mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Fix double user creation
This commit is contained in:
parent
29f565f514
commit
bae34c4b1c
@ -29,7 +29,11 @@ class Subscriber(User):
|
||||
return s.is_valid_now() if s is not None else False
|
||||
|
||||
def save(self):
|
||||
create = False
|
||||
if not self.id:
|
||||
create = True
|
||||
super(Subscriber, self).save()
|
||||
if create:
|
||||
try: # Create user on the old site: TODO remove me!
|
||||
db = MySQLdb.connect(**settings.OLD_MYSQL_INFOS)
|
||||
c = db.cursor()
|
||||
|
Loading…
Reference in New Issue
Block a user