question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skip row is not consistent when used inside and outside the admin

See original GitHub issue

Describe 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:open
  • Created a year ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
matthewhegartycommented, May 18, 2022

Have got a failing test here. Still some work to do.

0reactions
manelcloscommented, May 23, 2022

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 and original. I will try to debug on the server, and also try the default setting.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found