mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 16:32:15 +00:00
Bug fix with not oppening the connection
This commit is contained in:
@@ -6,7 +6,7 @@ import django
|
|||||||
|
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from django.db import connections
|
from django.db import connection, connections
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.db.utils import ConnectionDoesNotExist
|
from django.db.utils import ConnectionDoesNotExist
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
@@ -16,6 +16,9 @@ import datetime
|
|||||||
import uuid
|
import uuid
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
|
|
||||||
|
# Slight fix for needing to restablish the connection
|
||||||
|
connection.close()
|
||||||
|
|
||||||
def fix_email(email):
|
def fix_email(email):
|
||||||
if not (email is None or email is "") and ("@" not in email):
|
if not (email is None or email is "") and ("@" not in email):
|
||||||
email += "@nottingham.ac.uk"
|
email += "@nottingham.ac.uk"
|
||||||
|
|||||||
Reference in New Issue
Block a user