Skip to content

Commit

Permalink
Remove the load_fail value in table_contents
Browse files Browse the repository at this point in the history
Removes the load_fail value in table_contents due to finding a better implementation. Table data existence is checked by length of "values" in table_data.
  • Loading branch information
ItIsJordan committed Nov 8, 2023
1 parent b214fd9 commit de500f0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions hepdata/modules/records/assets/js/hepdata_tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ HEPDATA.table_renderer = {

$("#hepdata_table_loader").addClass("hidden");
$("#hepdata_table_content").removeClass("hidden");

if(table_data.load_fail) {
if(table_data.values.length == 0) {
$("#hepdata_table_loader").addClass("hidden");
$("#hepdata_filesize_fail").removeClass("hidden");
$("#hep_table").addClass("hidden");
Expand Down
3 changes: 1 addition & 2 deletions hepdata/modules/records/utils/data_processing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ def generate_table_structure(table_contents):
"review": table_contents["review"],
"associated_files": table_contents["associated_files"],
"keywords": {},
"values": [],
"load_fail": table_contents["load_fail"]}
"values": []}

record["description"] = sanitize_html(table_contents["title"])

Expand Down
1 change: 0 additions & 1 deletion hepdata/modules/records/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ def get_table_details(recid, data_recid, version, load_all):
table_contents["dependent_variables"] = []
table_contents["independent_variables"] = []

table_contents["load_fail"] = load_fail
table_contents["name"] = datasub_record.name
table_contents["title"] = datasub_record.description
table_contents["keywords"] = datasub_record.keywords
Expand Down

0 comments on commit de500f0

Please sign in to comment.