unias/docklet

Any change to user info will cause an error

Closed this issue · 6 comments

Error info is below.
File "/home/liupd/docklet/src/userManager.py", line 619, in modify
self.set_nfs_quota(user_modify.username,res['data']['data'])
KeyError: 'data'

@zhongyehong , Please fix it

You should set the data value in admin page, e.g 100

If I install docklet without any extra configuration, is this a bug I will meet in any conditions?
I will add some code to report this reason to admin.

No need, I will add default value in upgrade.py later.

caodg commented

@zhongyehong

It is a bug, should be fixed in main code.
It is unreasonable to have to run upgrade.py for a fresh install.
The data field should have a default value, which can work for a default installation.

Upgrade.py should only be used for an already running install.

If you first time to install docklet, the default values of all quota will be set, include data quota.
The problem is I add the data quota in upgrade.py, without setting default value of exists quota group, so I mean I will fix it.

Done