Skip to content

Commit

Permalink
Update for new server stress test
Browse files Browse the repository at this point in the history
  • Loading branch information
faytrow committed Sep 17, 2021
1 parent c228cbd commit 620160e
Show file tree
Hide file tree
Showing 3 changed files with 1,290 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/nal/lims/scripts/import 2_x clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
me = me.__of__(portal.acl_users)
newSecurityManager(None, me)

path = '/home/naladmin/pregithub/nalims/src/nal.lims/src/nal/lims/scripts/migration data/'
clients = pd.read_csv(path + 'clients_export.csv', keep_default_na=False, dtype=str)
path = '/home/naladmin/NALIMS/NALIMS/src/nal.lims/src/nal/lims/scripts/migration data/'
clients = pd.read_csv(path + 'basic_clients_export.csv', keep_default_na=False, dtype=str)

for i, row in clients.iterrows():
address = {'country':row['Country'], 'state':row['State'], 'district':row['District'],'city':row['City'],'zip':row['Zip'],'address':row['Address']}
# address = {'country':row['Country'], 'state':row['State'], 'district':row['District'],'city':row['City'],'zip':row['Zip'],'address':row['Address']}
thisclient = api.create(portal.clients,
"Client",
id='importclient'+str(i),
ClientID=row['NAL Number'],
title=row['Client ID'],
Name=row['Client ID'],
EmailAddress=row['Email Address'],
Phone=row['Phone'],
MBGGrowerNumber=row['Grower Number'],
PhysicalAddress = address,
PostalAddress = address,
BillingAddress = address
# EmailAddress=row['Email Address'],
# Phone=row['Phone'],
# MBGGrowerNumber=row['Grower Number'],
# PhysicalAddress = address,
# PostalAddress = address,
# BillingAddress = address
)
thisclient.reindexObject()
Loading

0 comments on commit 620160e

Please sign in to comment.