Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some checks for repeated values in the item lists were wrong #1686

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Bug Fixes

- Don't use a default for yaml config files except .large_image_config.yaml ([#1685](../../pull/1685))
- Some checks for repeated values in the item lists were wrong ([#1686](../../pull/1686))

## 1.30.0

Expand Down
10 changes: 5 additions & 5 deletions girder/girder_large_image/web_client/views/itemList.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
return false;
}
if (nav.type === 'itemList') {
if ((nav.name || '') === (self._namedList || '')) {
if ((nav.name || '') === (this._namedList || '')) {
return false;
}
if (!this._liconfig || !this._liconfig.namedItemLists || (nav.name && !this._liconfig.namedItemLists[nav.name])) {
Expand Down Expand Up @@ -461,7 +461,7 @@
return;
}
if (nav.type === 'itemList') {
if ((nav.name || '') === (self._namedList || '')) {
if ((nav.name || '') === (this._namedList || '')) {
return;
}
if (!this._liconfig || !this._liconfig.namedItemLists || (nav.name && !this._liconfig.namedItemLists[nav.name])) {
Expand Down Expand Up @@ -668,15 +668,15 @@
const column = columns[+ctrl.attr('column-idx')];
let tempValue = ctrl.find('.g-widget-metadata-value-input').val();
tempValue = tempValue.trim();
let valResult = validateMetadataValue(column, tempValue, self._lastValidationError || (tempValue === '' && !column.required));
let valResult = validateMetadataValue(column, tempValue, this._lastValidationError || (tempValue === '' && !column.required));
if (tempValue === '' && !column.required) {
valResult = {value: tempValue};
}
if (!valResult) {
self._lastValidationError = true;
this._lastValidationError = true;

Check warning on line 676 in girder/girder_large_image/web_client/views/itemList.js

View check run for this annotation

Codecov / codecov/patch

girder/girder_large_image/web_client/views/itemList.js#L676

Added line #L676 was not covered by tests
return false;
}
self._lastValidationError = false;
this._lastValidationError = false;

Check warning on line 679 in girder/girder_large_image/web_client/views/itemList.js

View check run for this annotation

Codecov / codecov/patch

girder/girder_large_image/web_client/views/itemList.js#L679

Added line #L679 was not covered by tests
const item = this.collection.get(ctrl.closest('[g-item-cid]').attr('g-item-cid'));
let value = item.get('meta') || {};
let meta;
Expand Down