Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aube
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
erdnaxe
aube
Commits
f02e6c6e
Commit
f02e6c6e
authored
Jun 17, 2018
by
Hugo LEVY-FALK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix du AESEncryptedField
parent
9cae5822
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
preferences/aes_field.py
preferences/aes_field.py
+6
-0
No files found.
preferences/aes_field.py
View file @
f02e6c6e
...
...
@@ -79,6 +79,12 @@ class AESEncryptedField(models.CharField):
return
decrypt
(
settings
.
AES_KEY
,
binascii
.
a2b_base64
(
value
)).
decode
(
'utf-8'
)
def
from_db_value
(
self
,
value
,
*
args
,
**
kwargs
):
if
value
is
None
:
return
value
return
decrypt
(
settings
.
AES_KEY
,
binascii
.
a2b_base64
(
value
)).
decode
(
'utf-8'
)
def
get_prep_value
(
self
,
value
):
if
value
is
None
:
return
value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment