better return value when change ldap entrys
This commit is contained in:
parent
16521a60c2
commit
ca1f2259c5
|
@ -3,6 +3,7 @@ from geruecht.decorator import login_required
|
||||||
import geruecht.controller.userController as uc
|
import geruecht.controller.userController as uc
|
||||||
from geruecht.model import USER
|
from geruecht.model import USER
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
import time
|
||||||
|
|
||||||
user = Blueprint("user", __name__)
|
user = Blueprint("user", __name__)
|
||||||
|
|
||||||
|
@ -43,6 +44,8 @@ def _saveConfig(**kwargs):
|
||||||
accToken = kwargs['accToken']
|
accToken = kwargs['accToken']
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
accToken.user = userController.modifyUser(accToken.user, accToken.ldap_conn, data)
|
accToken.user = userController.modifyUser(accToken.user, accToken.ldap_conn, data)
|
||||||
return jsonify(data)
|
retVal = accToken.user.toJSON()
|
||||||
|
retVal['creditList'] = {credit.year: credit.toJSON() for credit in accToken.user.geruechte}
|
||||||
|
return jsonify(retVal)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
return jsonify("error", err), 409
|
return jsonify({"error": err}), 409
|
Loading…
Reference in New Issue