Closed coldmind closed 9 years ago
The test suite includes a test of EncryptedIntegerField
that passes fine under Django 1.7. Can you provide an example of what you are trying to do, and a full traceback of the resulting error?
Issue exists at least for postgresql (maybe mysql and etc. are affected), where self.integer_field_ranges
are defined.
I created project with minimum steps to reproduce: https://github.com/coldmind/django-encrypted-fields_issue7
Problem is in full_clean
of django1.7
When I installed 1.6, full_clean
passes without exception.
Why
get_internal_type
is alsoTextField
forEncryptedIntegerField
? When it cames to django validation,django.db.backends.BaseDatabaseOperations#integer_field_range
fails, because there are noTextField
inself.integer_field_ranges
.I got this problem in django 1.7.
UPD: I understood why, because after encryption it became text. But before it will be saved in DB, it must pass validation.