-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Import empty rows #2
Comments
I have applied the fix there in pyexcel-io: pyexcel/pyexcel-io#1 You can get it before I release it via:
Please let me know if it works for you |
Hey, that works fine, but only in a situation where the model does not have fields with the value "unique = True". I tested a situation when the database is already one of the fields blank with the parameter "unique=True"
Therefore, I think a good solution would be to introduce a parameter that allowed to skip the already existing values. |
By default, pyexcel give '' for empty cell but I think database treat null as empty. In your case, I guess it is because '' was given toexpenses_type and if '' is given at the second time, it will hit unique key problem. So, I suppose if pyexcel replace '' for None in your case, would it help? |
This would help only if the blank and duplicate were changed to None. This would eliminate the problem of unique. |
tried, 'None' field does not work for Django. I have another solution and am working on it. Here is the issue tracker for it. pyexcel/pyexcel-io#2 |
Please try the newer fix again:
Hope it make your use case smooth. I have to say it will be slow if your data size is huge but for now, I couldn't think of other faster way. |
Hello, I tested and working properly. In the case where the model have a unique value duplicate and blank lines are ignored. In the case of large amounts of data can be divided and import parcels. Thank you very much! |
pyexcel-io v0.0.5 with two fixes was just published to pypi. |
Why is it possible to import empty rows?
They should not be skipped?
The text was updated successfully, but these errors were encountered: