Quota leer bei Agentur FIX
This commit is contained in:
parent
a9b6d95dbb
commit
b82d0f6a28
Binary file not shown.
|
|
@ -1181,7 +1181,6 @@ def getNCDirInfosURL(request, ncid):
|
|||
@register.simple_tag
|
||||
def getAGGroupQuotaData(request):
|
||||
r = requests.request("PROPFIND", settings.NEXTCLOUD_URL + "remote.php/dav/files/" + request.user.username + "/Agenturdaten", headers={'Content-Type' : 'text/xml', 'Authorization' : "Bearer " + request.user.profile.nc_sid})
|
||||
try:
|
||||
# IN USE
|
||||
split_response = r.text.split("<d:quota-used-bytes>")
|
||||
inuse = split_response[1].split("</d:quota-used-bytes>")[0]
|
||||
|
|
@ -1193,8 +1192,6 @@ def getAGGroupQuotaData(request):
|
|||
# PERCENT VALUE
|
||||
percent = (100 / int(quota))*int(inuse)
|
||||
return [quota, inuse, str(round(percent, 0)).replace(",", ".")]
|
||||
except:
|
||||
return [0, 0, 0]
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue