diff --git a/adm/templates/adm/adm_import_flow.html b/adm/templates/adm/adm_import_flow.html index e1414eb..f54bbb2 100644 --- a/adm/templates/adm/adm_import_flow.html +++ b/adm/templates/adm/adm_import_flow.html @@ -241,7 +241,7 @@ var ncfiledata = []; //Anlegen der Standarddateien function rebuildingStandards(id){ - ncfiledata = []; + var ncfiledata = []; $("#cloud_process_standards").show(); ncfiledata[0] = ['standardid', id]; console.log("LOADING NC FILES"); diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc index 7abe1f4..46b948e 100644 Binary files a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc and b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc differ diff --git a/standards/templatetags/counter_tag.py b/standards/templatetags/counter_tag.py index c616914..2082aee 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -1182,16 +1182,19 @@ def getNCDirInfosURL(request, ncid): 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}) # IN USE - split_response = r.text.split("") - inuse = split_response[1].split("")[0] - - # QUOTA - split_response = r.text.split("") - quota = split_response[1].split("")[0] + try: + split_response = r.text.split("") + inuse = split_response[1].split("")[0] + + # QUOTA + split_response = r.text.split("") + quota = split_response[1].split("")[0] - # PERCENT VALUE - percent = (100 / int(quota))*int(inuse) - return [quota, inuse, str(round(percent, 0)).replace(",", ".")] + # PERCENT VALUE + percent = (100 / int(quota))*int(inuse) + return [quota, inuse, str(round(percent, 0)).replace(",", ".")] + except: + return [0, 0, 0]