Skip to content
Snippets Groups Projects
Commit 88664b57 authored by Seb Barnard's avatar Seb Barnard :speech_balloon:
Browse files

Removed any special characters causing problems with h2

parent e56bab31
No related branches found
No related tags found
6 merge requests!56tags will be saved to userFavTags table (needs user ID of current logged in user),!17Removal of "AUTO_INCREMENT" on AdminTypes id field since there will only ever...,!13merging develop branch into issueFour,!12Adding finished JPA and database to remove blockers,!10Branch Update,!9Removed any special characters causing problems with h2
This diff is collapsed.
...@@ -50,7 +50,7 @@ def namePopulator(amount, userType): ...@@ -50,7 +50,7 @@ def namePopulator(amount, userType):
newForenames = [] newForenames = []
newSurnames = [] newSurnames = []
for i in range(0, amount): for i in range(0, amount):
newForenames.append(forenameList[random.randint(0, len(forenameList))]) newForenames.append(re.sub('[^A-Za-z0-9]+', '', forenameList[random.randint(0, len(forenameList))]))
newSurnames.append(surnameList[random.randint(0, len(surnameList))]) newSurnames.append(surnameList[random.randint(0, len(surnameList))])
# GENERATE EXAMPLE PASSWORD WITH SHA256 + SALT # GENERATE EXAMPLE PASSWORD WITH SHA256 + SALT
...@@ -93,9 +93,14 @@ def companyPopulator(amount): ...@@ -93,9 +93,14 @@ def companyPopulator(amount):
# Get full list of countries, might need amending (lots of potentially unused countries) # Get full list of countries, might need amending (lots of potentially unused countries)
f = open("countries.txt", "r") f = open("countries.txt", "r")
countries = f.read().split("\n") tempCountries = f.read().split("\n")
f.close() f.close()
countries = []
for each in tempCountries:
each = each.replace("|"," ")
countries.append(re.sub('[^A-Za-z0-9 ]+', '', each))
# Generate fake website from company name # Generate fake website from company name
websiteArray = [] websiteArray = []
for each in companyNames: for each in companyNames:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment