Fixed an issue where a blank string is stored instead of NULL in create mode in server dialog. Fixes #6915

This commit is contained in:
Akshay Joshi 2021-10-19 17:01:50 +05:30
parent 9de1489322
commit ea0d3eb812

View File

@ -1017,6 +1017,13 @@ class ServerNode(PGChildNodeView):
request.data, encoding='utf-8'
)
# Loop through data and if found any value is blank string then
# convert it to None as after porting into React, from frontend
# '' blank string is coming as a value instead of null.
for item in data:
if data[item] == '':
data[item] = None
# Get enc key
crypt_key_present, crypt_key = get_crypt_key()
if not crypt_key_present: