Fixed old database bug in dev env

This commit is contained in:
2016-09-02 21:24:10 +02:00
parent c5fd9d0076
commit 8328e668bd
3 changed files with 51 additions and 43 deletions

View File

@ -240,7 +240,7 @@ class User(AbstractBaseUser):
else:
create = True
super(User, self).save(*args, **kwargs)
if create: # Create user on the old site: TODO remove me!
if create and settings.IS_OLD_MYSQL_PRESENT: # Create user on the old site: TODO remove me!
import MySQLdb
try:
db = MySQLdb.connect(**settings.OLD_MYSQL_INFOS)