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
if model filed type is BigInt, import excel data error #788
Comments
Hi @luohaifenglight and thanks for opening this issue. Can you add failing test case? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Same here! diff --git a/tests/core/tests/test_widgets.py b/tests/core/tests/test_widgets.py
index 7969961..5d41b58 100644
--- a/tests/core/tests/test_widgets.py
+++ b/tests/core/tests/test_widgets.py
@@ -253,11 +253,11 @@ class DecimalWidgetTest(TestCase):
class IntegerWidgetTest(TestCase):
def setUp(self):
- self.value = 0
+ self.value = 163371428940853127
self.widget = widgets.IntegerWidget()
def test_clean_integer_zero(self):
- self.assertEqual(self.widget.clean(0), self.value)
+ self.assertEqual(self.widget.clean(163371428940853127), self.value) Then
|
This is the problem
https://github.com/django-import-export/django-import-export/blob/main/import_export/widgets.py#L88 |
I will do a PR with this fix:
|
Signed-off-by: José Luis Di Biase <josx@interorganic.com.ar>
Signed-off-by: José Luis Di Biase <josx@interorganic.com.ar>
Big integer support for Integer widget (#788)
if model filed type is BigInt, such as 163371428940853127, to be convert 163371428940853120 overflow.
The text was updated successfully, but these errors were encountered: