Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Whitelist header Row checks #564

Open
F-OBrien opened this issue Apr 1, 2019 · 4 comments
Open

Issue with Whitelist header Row checks #564

F-OBrien opened this issue Apr 1, 2019 · 4 comments

Comments

@F-OBrien
Copy link

F-OBrien commented Apr 1, 2019

The whitelist header row checks appear to be shifted by one.
For example if you take the template whitelist and simply delete the "is Accredited" and "Non-Accredited Limit" columns you get an error per below. As these columns are not required unless the Pegged STO is attached this should not result in an error.
image
If you delete the Exempt from "Exempt From % Ownership" column you get
image
delete the "Can Buy From STO" column you get
image

@F-OBrien
Copy link
Author

F-OBrien commented Apr 1, 2019

Further to the above if the header is simply renamed it seems to give the correct error message. The column header error shift seems to only happen when columns are completely deleted. I've attached the whitelist file that gives me this error in case it has some how it become incorrectly formatted by simply opening in excel deleting the last two columns and saving.

whitelist-sample (12).zip

@F-OBrien
Copy link
Author

F-OBrien commented Apr 1, 2019

Ok I believe the issue may be that excel adds a carriage return where there would only have been a new line (LF) with the original file. this possibly explains why I've had errors reported by the last line of whitelists edited in excel also. If this is the case it should be handled or some clear guidance should be provided to issuers about editing the .csv file to ensure it remains functional.

Original
image
After Edit in Excel
image

@sajclarke
Copy link
Contributor

Thanks @F-OBrien for opening this issue! Taking a look at this now.

@F-OBrien
Copy link
Author

F-OBrien commented Apr 6, 2019

I believe changing this line

to let rows = data.split(/\r\n|\r|\n/); or let rows = data.split(/\r?\n/); should resolve this issue and allow imports of csv files edited on both Windows and UNIX systems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants