Skip row is not consistent when used inside and outside the admin
See original GitHub issueDescribe the bug Changes on the dataset are detected if using the admin to import a dataset.
Programmatic import shows no differences.
To Reproduce
CharField with null value in the database
skip_unchanged = True
in the ModelResource
Versions (please complete the following information):
- Django Import Export: 2.8.0 and 3.0b3
- Python 3.8
- Django 3.2
Expected behavior Same import result in both cases.
Additional context
Code from 3.0b3 as an example:
def skip_row():
....
else:
# debug values for "name" column
if field.column_name == 'name':
print('instance: "%s"' % field.get_value(instance), 'original: "%s"' % field.get_value(original))
if field.get_value(instance) != field.get_value(original):
return False
Admin shows: instance “” original “None”, so reports them as different Management command shows: instance “None” original “None”, no changes are reported
I think the Admin is wrong, or it could be a configuration issue 😃
Issue Analytics
- State:
- Created a year ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Troubleshooting skipped row errors - Amazon QuickSight
Make sure that there is no inconsistency between the field data type and the field data, for example occasional string data in a...
Read more >django-import-export how to skip import some rows based on ...
I have updated the skip_row(...) method to test whether the skip is working properly or not. class BookResource(ModelResource): count = 1 ...
Read more >'skip rows' in a flat file source does not work as advertised
When I created a simple Data flow using the two connection managers, it fails (as expected) on the BlankSecondRow as the above definition ......
Read more >Wrap text not adjust row height - Office - Microsoft Learn
This behavior occurs if you have manually modified the height of the row. Workaround. To adjust the height of the row to fit...
Read more >Documentation: 15: 5.8. Row Security Policies - PostgreSQL
In addition to the SQL-standard privilege system available through GRANT, tables can have row security policies that restrict, on a per-user basis, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have got a failing test here. Still some work to do.
Hi @matthewhegarty, I’ve setup the failing scenario in the admin import test, but I’m unable to reproduce, I always get None on “isbn” field both for
instance
andoriginal
. I will try to debug on the server, and also try thedefault
setting.