API & Client: profile edition refactor
This commit is contained in:
@ -429,7 +429,7 @@ def test_user_profile_valid_update(app):
|
||||
last_name='Doe',
|
||||
location='Somewhere',
|
||||
bio='just a random guy',
|
||||
birth_date='01/01/1980'
|
||||
birth_date='1980-01-01'
|
||||
)),
|
||||
headers=dict(
|
||||
Authorization='Bearer ' + json.loads(
|
||||
|
@ -207,7 +207,7 @@ def edit_user(user_id):
|
||||
user.bio = bio
|
||||
user.location = location
|
||||
user.birth_date = (
|
||||
datetime.datetime.strptime(birth_date, '%d/%m/%Y')
|
||||
datetime.datetime.strptime(birth_date, '%Y-%m-%d')
|
||||
if birth_date
|
||||
else None
|
||||
)
|
||||
|
Reference in New Issue
Block a user