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

Handle empty saveto questions #694

Merged
merged 2 commits into from
Oct 21, 2022
Merged

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Oct 13, 2022

This solves issues found in collect/#5294

What has been done to verify that this works as intended?

New tests

Why is this the best possible solution? Were any other approaches considered?

The only alternative was to store empty answers as null in their respective properties, but after discussing with the Central team, we felt it was easier to treat these cases as an empty string so that we can keep entity properties non-nullable.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Not a big change here. Should only affect questions with saveto attributes

This feels like it's more of a contract between JavaRosa and the
client so more appropriate at the top level.
@seadowg seadowg marked this pull request as ready for review October 13, 2022 10:02
return new Pair<>(saveTo.getSecond(), answer);
IAnswerData answerData = mainInstance.resolveReference(reference).getValue();

if (answerData != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arg, null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants