Skip to content

Commit

Permalink
fix: LEAP-1049: support loading TimeSeries URL from sub-property of d…
Browse files Browse the repository at this point in the history
…ata (#5610) (#5883)

contributed by @harrymander in #5611 

### PR fulfills these requirements
- [x] Commit message(s) and PR title follows the format
`[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made`
ex. `fix: DEV-XXXX: Removed inconsistent code usage causing intermittent
errors`
- [ ] Tests for the changes have been added/updated (for bug
fixes/features)
- [ ] Docs have been added/updated (for bug fixes/features)
- [ ] Best efforts were made to ensure docs/code are concise and
coherent (checked for spelling/grammatical errors, commented out code,
debug logs etc.)
- [x] Self-reviewed and ran all changes on a local instance (for bug
fixes/features)

#### Change has impacts in these area(s)
_(check all that apply)_
- [ ] Product design
- [ ] Backend (Database)
- [ ] Backend (API)
- [x] Frontend

#### What does this fix?
Fixes #5610

---------

Co-authored-by: robot-ci-heartex <[email protected]>
  • Loading branch information
jombooth and robot-ci-heartex authored May 14, 2024
1 parent 9b015c7 commit 303282b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions web/dist/apps/labelstudio/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"message": "Merge branch 'develop' into fb-dia-989/hotkeys-stuck",
"commit": "cb6e68bc71dc0063679c60ac7d0ced52c1efd53a",
"date": "2024-05-08T20:42:38.000Z",
"branch": "fb-dia-989/hotkeys-stuck"
"message": "fix: LEAP-1049: support loading TimeSeries URL from sub-property of data (#5610)",
"commit": "d8819c35df0430a6adf646faa99b73e6f5df3f4f",
"date": "2024-05-14T19:41:41.000Z",
"branch": "fb-LEAP-1049/harrymander-fix-for-timeseries-urls"
}
8 changes: 4 additions & 4 deletions web/dist/libs/datamanager/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"message": "Merge branch 'develop' into fb-dia-989/hotkeys-stuck",
"commit": "cb6e68bc71dc0063679c60ac7d0ced52c1efd53a",
"date": "2024-05-08T20:42:38.000Z",
"branch": "fb-dia-989/hotkeys-stuck"
"message": "fix: LEAP-1049: support loading TimeSeries URL from sub-property of data (#5610)",
"commit": "d8819c35df0430a6adf646faa99b73e6f5df3f4f",
"date": "2024-05-14T19:41:41.000Z",
"branch": "fb-LEAP-1049/harrymander-fix-for-timeseries-urls"
}
2 changes: 1 addition & 1 deletion web/dist/libs/editor/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/dist/libs/editor/main.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions web/dist/libs/editor/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"message": "Merge branch 'develop' into fb-dia-989/hotkeys-stuck",
"commit": "cb6e68bc71dc0063679c60ac7d0ced52c1efd53a",
"date": "2024-05-08T20:42:38.000Z",
"branch": "fb-dia-989/hotkeys-stuck"
"message": "fix: LEAP-1049: support loading TimeSeries URL from sub-property of data (#5610)",
"commit": "d8819c35df0430a6adf646faa99b73e6f5df3f4f",
"date": "2024-05-14T19:41:41.000Z",
"branch": "fb-LEAP-1049/harrymander-fix-for-timeseries-urls"
}
6 changes: 3 additions & 3 deletions web/libs/editor/src/tags/object/TimeSeries.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "./TimeSeries/helpers";
import { AnnotationMixin } from "../../mixins/AnnotationMixin";
import PersistentStateMixin from "../../mixins/PersistentState";
import { parseCSV, tryToParseJSON } from "../../utils/data";
import { parseCSV, parseValue, tryToParseJSON } from "../../utils/data";
import { fixMobxObserve } from "../../utils/utilities";

import "./TimeSeries/Channel";
Expand Down Expand Up @@ -421,7 +421,7 @@ const Model = types

if (self.valuetype !== "url") {
if (self.value) {
self.setData(dataObj[idFromValue(self.value)]);
self.setData(parseValue(self.value, dataObj));
} else {
self.setData(dataObj);
}
Expand All @@ -434,7 +434,7 @@ const Model = types
store.annotationStore.addErrors([errorBuilder.generalError(message)]);
return;
}
const url = dataObj[idFromValue(self.value)];
const url = parseValue(self.value, dataObj);

if (!url || typeof url !== "string") {
const message = `Cannot find url in <b>${idFromValue(self.value)}</b> field of your task`;
Expand Down

0 comments on commit 303282b

Please sign in to comment.