defrex/django-encrypted-fields

`get_internal_type` for EncryptedIntegerField (django 1.7)

coldmind opened this issue · 2 comments

Why get_internal_type is also TextField for EncryptedIntegerField?
When it cames to django validation, django.db.backends.BaseDatabaseOperations#integer_field_range fails, because there are no TextField in self.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.

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.