Removed Explicitly Setting Variable Type to Two Single Quotes #2425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
N/A
Proposed Changes
Removes explicitly setting the variable type to two single quotes.
Reason for Changes
Before the toXml/fromXml pr went in there was a check in domToFieldVariable_ to change an string containing two single quotes to an empty string, with a comment that maybe this wasn't necessary. I believe the only purpose of that chunk of code was to undo the thing that I am removing now (where the string containing two double quotes is created).
This all seems a bit weird though so I'm not sure if there was a secret purpose behind it. I did check the git blame and found the original PR, but I didn't see any information about why it was set up this way.
Test Coverage
I discovered this because field_variable's fromXml was throwing an errow when it was trying to deserialize the dynamic category XML, so I added tests for both the untyped and typed variable dynamic categories.
I also manually tested creating variables through the flyout buttons, and that is working.
And I checked the test blocks' variable field block, and it is working.
Tested on:
Additional Information