Skip to content

Commit

Permalink
fix: Could not re-open application created variables (#5435)
Browse files Browse the repository at this point in the history
- Passing in a VariableDescriptor with a valid ID was not creating a proper VariableDefinition
- It's checking "s/" specifically, whereas application variable is prefixed with "a/"
- Tested by following the steps in the description.
  • Loading branch information
mofojed authored and stanbrub committed May 3, 2024
1 parent 8185954 commit 67d1b4f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class JsVariableDefinition {

public JsVariableDefinition(String type, String title, String id, String description) {
// base64('s/' + str) starts with 'cy8' or 'cy9'
if (!id.startsWith("cy")) {
// base64('a/' + str) starts with 'YS8' or 'YS9'
if (!id.startsWith("cy") && !id.startsWith("YS")) {
throw new IllegalArgumentException("Cannot create a VariableDefinition from a non-scope ticket");
}
this.type = type;
Expand Down

0 comments on commit 67d1b4f

Please sign in to comment.