parchado de errores

parent cb184636
......@@ -167,7 +167,7 @@
class="hidden" {% endif %}>
<a title="View Report"
{% if product.initial_folder %}
href="../reports/{{ product.purchase_id }}/{{ product.initial_folder }}_sclData"
href="../reports/{{ product.purchase_id }}/{{ product.initial_folder }}"
{% endif %}
class="btn btn-success">
<i class="fa fa-eye"></i>
......
......@@ -47,6 +47,14 @@ def report_L2ASCL(request, report, purchase_id):
with open(USERS_PATH + request.user.email + "/" + purchase_id + "/" + report + ".json") as f:
json_data = OrderedDict(json.load(f))
if len(json_data)==0:
graphData = ""
defaultLabel=""
defaultDataset=""
folders.remove(reporteDir)
else:
print("lleno")
graphData = dict()
graphData['type'] = "line"
......@@ -97,12 +105,11 @@ def report_L2ASCL(request, report, purchase_id):
# -------------------------------------------------------------------------------def Reports(request):
def Reports(request):
progress = 0
productList = []
size = 0
folders=[]
product_list = Purchase.objects.values('id', 'productList', 'aggreg_date', 'search__clouds', 'search__startDate',
'search__endDate', 'search__process_id__name').filter(
user_id=request.user.id, purchased=1)
......@@ -143,8 +150,11 @@ def Reports(request):
print("folder out noes not exists")
else:
folders = os.listdir(path=absolute_path)
for folder in folders:
initial_folder=folder
if len(folders)==0:
initial_folder="../#"
else:
initial_folder = folders.pop(0)+"_sclData"
productList.append({
"process": producto['search__process_id__name'],
......
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 to comment