Commit 943e87e9 by x

store: Fixed quota magnitude

parent 206e86c1
...@@ -82,7 +82,7 @@ def set_quota(sender, instance, created, **kwargs): ...@@ -82,7 +82,7 @@ def set_quota(sender, instance, created, **kwargs):
if not StoreApi.createuser(instance.user.username, password, key_list, quota): if not StoreApi.createuser(instance.user.username, password, key_list, quota):
pass pass
else: else:
StoreApi.set_quota(instance.user.username, instance.disk_quota) StoreApi.set_quota(instance.user.username, instance.disk_quota*1024)
post_save.connect(set_quota, sender=UserCloudDetails) post_save.connect(set_quota, sender=UserCloudDetails)
def reset_keys(sender, instance, created, **kwargs): def reset_keys(sender, instance, created, **kwargs):
......
...@@ -15,7 +15,7 @@ def estabilish_store_user(user): ...@@ -15,7 +15,7 @@ def estabilish_store_user(user):
try: try:
details = request.user.userclouddetails_set.all()[0] details = request.user.userclouddetails_set.all()[0]
password = details.smb_password password = details.smb_password
quota = details.disk_quota quota = details.disk_quota * 1024
key_list = [] key_list = []
for key in request.user.sshkey_set.all(): for key in request.user.sshkey_set.all():
key_list.append(key.key) key_list.append(key.key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment