mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where MSQL is not loading while creating a new login role.
This commit is contained in:
parent
287c53cd5a
commit
3eac4ba59e
@ -529,20 +529,17 @@ rolmembership:{
|
|||||||
data = json.loads(request.data)
|
data = json.loads(request.data)
|
||||||
else:
|
else:
|
||||||
data = dict()
|
data = dict()
|
||||||
req = request.args or request.form
|
for k, v in request.args.items():
|
||||||
|
try:
|
||||||
for key in req:
|
# comments should be taken as is because if user enters
|
||||||
|
# a json comment it is parsed by loads which should not
|
||||||
val = req[key]
|
# happen
|
||||||
if key in [
|
if k in ('comment',):
|
||||||
'rolcanlogin', 'rolsuper', 'rolcreatedb',
|
data[k] = v
|
||||||
'rolcreaterole', 'rolinherit', 'rolreplication',
|
else:
|
||||||
'rolcatupdate', 'variables', 'rolmembership',
|
data[k] = json.loads(v)
|
||||||
'seclabels', 'rolmembers'
|
except ValueError:
|
||||||
]:
|
data[k] = v
|
||||||
data[key] = json.loads(val)
|
|
||||||
else:
|
|
||||||
data[key] = val
|
|
||||||
|
|
||||||
invalid_msg_arr = [
|
invalid_msg_arr = [
|
||||||
self._validate_rolname(kwargs.get('rid', -1), data),
|
self._validate_rolname(kwargs.get('rid', -1), data),
|
||||||
|
Loading…
Reference in New Issue
Block a user