Skip to content

Commit

Permalink
add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Aug 20, 2021
1 parent b5f98b6 commit f7ee439
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions mpcontribs-api/mpcontribs/api/contributions/document.py
Expand Up @@ -287,6 +287,7 @@ def make_quantities(path, key, value):

@classmethod
def post_save(cls, sender, document, **kwargs):
# TODO only parts of this need to run on PUT/update
if kwargs.get("skip"):
return

Expand Down
2 changes: 1 addition & 1 deletion mpcontribs-api/mpcontribs/api/projects/document.py
Expand Up @@ -124,7 +124,7 @@ class Projects(Document):
authors = StringField(
required=True,
help_text="comma-separated list of authors"
# TODO set regex to enforce format
# TODO change to EmbeddedDocumentListField
)
description = StringField(
min_length=5,
Expand Down
2 changes: 2 additions & 0 deletions mpcontribs-client/mpcontribs/client/__init__.py
Expand Up @@ -143,6 +143,7 @@ def grouper(n, iterable):


def get_session():
# TODO add Bad Gateway 502?
adapter_kwargs = dict(max_retries=Retry(
total=RETRIES,
read=RETRIES,
Expand Down Expand Up @@ -1436,6 +1437,7 @@ def submit_contributions(
)

if not ignore_dupes and dupe:
# TODO add matching duplicate info to msg
msg = f"Duplicate in {project_name}: {contrib['identifier']} {dct['name']}"
raise ValueError(msg)

Expand Down
8 changes: 7 additions & 1 deletion mpcontribs-portal/mpcontribs/portal/assets/js/landingpage.js
Expand Up @@ -157,11 +157,17 @@ function load_data(dom) {
}
}
}
// TODO loadData clears plugins/meta caches
dom.loadData(response.data);
if (total_count > default_limit) {
const height = response.data.length * rowHeight;
dom.updateSettings({height: height});
}
//console.log($(hot).get(0).scrollWidth);
//console.log($(hot).width());
// TODO only collapseAll if table horizontal scroll
//const collapse = hot.getPlugin("collapsibleColumns");
//collapse.collapseAll();
$('#table_filter').removeClass('is-loading');
$('#table_delete').removeClass('is-loading');
$('[name=table]').first().removeClass("is-invisible");
Expand Down Expand Up @@ -440,7 +446,7 @@ $("#table_get_download").click(function() { reset_table_download(); });
$("#toggle_collapse").change(function() {
const collapse = hot.getPlugin("collapsibleColumns");
if (this.checked) { collapse.collapseAll(); }
else { collapse.expandAll(); }
else { collapse.expandAll(); } // TODO
});

//if ($("#graph").length && project !== 'redox_thermo_csp') {
Expand Down

0 comments on commit f7ee439

Please sign in to comment.