From 66061cdfbace17989a15eb4dabd8a8cfeea12eb4 Mon Sep 17 00:00:00 2001 From: ermbutler Date: Mon, 9 Aug 2021 13:08:34 +0000 Subject: [PATCH 1/5] fixed faulty check for hideAttributes --- main/static/js/project-settings/type-form.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/static/js/project-settings/type-form.js b/main/static/js/project-settings/type-form.js index ac1c1895c..0ac6561e3 100644 --- a/main/static/js/project-settings/type-form.js +++ b/main/static/js/project-settings/type-form.js @@ -18,6 +18,9 @@ class TypeForm extends TatorElement { // Loading spinner this.loading = new LoadingSpinner(); this._shadow.appendChild(this.loading.getImg()); + + // Init hide attributes + this._hideAttributes = false; } _init({ data, modal, sidenav, versionListHandler, mediaListHandler }) { @@ -79,7 +82,7 @@ class TypeForm extends TatorElement { const sectionForm = await this._getSectionForm(this.data); this.typeFormDiv.appendChild(sectionForm); - if (typeof this._hideAttributes !== "undefined" && !this._hideAttributes) { + if (typeof this._hideAttributes !== "undefined" && this._hideAttributes == false) { this.typeFormDiv.appendChild(this._getAttributeSection()); } From 83e516a9e1c8f2750172877b81a56307ffb6413f Mon Sep 17 00:00:00 2001 From: ermbutler Date: Mon, 9 Aug 2021 13:16:04 +0000 Subject: [PATCH 2/5] remove console logging from checkbox input --- main/static/js/components/inputs/feature/checkbox-set.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main/static/js/components/inputs/feature/checkbox-set.js b/main/static/js/components/inputs/feature/checkbox-set.js index 69ab51902..3a86d6e29 100644 --- a/main/static/js/components/inputs/feature/checkbox-set.js +++ b/main/static/js/components/inputs/feature/checkbox-set.js @@ -68,8 +68,6 @@ class CheckboxSet extends TatorElement { } _newInput(item){ - console.log(item.id); - console.log(item.name); let checkbox = document.createElement("checkbox-input"); checkbox.setAttribute("name", `${item.name}`); if (this.type != undefined) { @@ -151,7 +149,7 @@ class CheckboxSet extends TatorElement { this._inputs.splice(idx, 1); checkbox.remove() const inputWrapper = this._inputDiv.children[idx]; - console.log(inputWrapper); + // console.log(inputWrapper); this._inputDiv.removeChild(inputWrapper); return true; From f8929aa71a2f76eb2914e17570f897f051cb66f6 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 9 Aug 2021 21:13:15 +0000 Subject: [PATCH 3/5] Export path in install script --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index e0f0ee887..e17dc1525 100755 --- a/install.sh +++ b/install.sh @@ -124,6 +124,7 @@ echo "Installing pip packages." pip3 install --upgrade pip pip3 install setuptools pip3 install /tmp/*.whl pandas opencv-python pytest pyyaml playwright pytest-playwright +export PATH=$PATH:$HOME/.local/bin:/snap/bin playwright install # Install tator. From 455cc40dd4aff62968bbdcd587f09dec2a3821c2 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 9 Aug 2021 21:41:45 +0000 Subject: [PATCH 4/5] Fix typo in version filename --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 43e581c1a..64712958d 100644 --- a/Makefile +++ b/Makefile @@ -352,7 +352,7 @@ FILES = \ project-settings/leaf-type-edit.js \ project-settings/state-type-edit.js \ project-settings/membership-edit.js \ - project-settings/version-edit.js \ + project-settings/versions-edit.js \ project-settings/project-settings.js \ annotation/annotation-breadcrumbs.js \ annotation/lock-button.js \ From d907a3aaa7bff044104afa4910f93861aa015904 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 10 Aug 2021 01:44:15 +0000 Subject: [PATCH 5/5] Move `qs.difference` after other filters since they are not applied otherwise --- main/rest/_annotation_query.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/rest/_annotation_query.py b/main/rest/_annotation_query.py index d06783205..866c328e0 100644 --- a/main/rest/_annotation_query.py +++ b/main/rest/_annotation_query.py @@ -190,15 +190,15 @@ def _get_annotation_psql_queryset(project, filter_ops, params, annotation_type): if after is not None: qs = qs.filter(pk__gt=after) - if exclude_parents: - parent_set = Localization.objects.filter(pk__in=Subquery(qs.values('parent'))) - qs = qs.difference(parent_set) - # TODO: Remove modified parameter qs = qs.exclude(modified=False) qs = get_attribute_psql_queryset(qs, params, filter_ops) + if exclude_parents: + parent_set = Localization.objects.filter(pk__in=Subquery(qs.values('parent'))) + qs = qs.difference(parent_set) + # Coalesce is a no-op that prevents PSQL from using the primary key index for small # LIMIT values (which results in slow queries). if exclude_parents or (stop is None):