OBGM-516 Unable to run inventory by location report#4112
Merged
awalkowiak merged 2 commits intofeature/upgrade-to-grails-3.3.10from Jun 19, 2023
Merged
OBGM-516 Unable to run inventory by location report#4112awalkowiak merged 2 commits intofeature/upgrade-to-grails-3.3.10from
awalkowiak merged 2 commits intofeature/upgrade-to-grails-3.3.10from
Conversation
…getters in MultiLocationInventoryReportCommand
alannadolny
commented
Jun 16, 2023
Comment on lines
38
to
42
| return actionButton?.equalsIgnoreCase("run") ?: false | ||
| } | ||
|
|
||
| Boolean getIsActionDownload() { | ||
| return actionButton?.equalsIgnoreCase("download") | ||
| return actionButton?.equalsIgnoreCase("download") ?: false |
Collaborator
Author
There was a problem hiding this comment.
This part was throwing that isActionRun and isActionDownload cannot be null, so as a solution, I am returning false when actionButton is null.
|
|
||
| Boolean getIsActionRun() { | ||
| return actionButton?.equalsIgnoreCase("run") | ||
| return actionButton?.equalsIgnoreCase("run") ?: false |
Collaborator
There was a problem hiding this comment.
@alannadolny by default all Grails properties are nullable: false. To make it work "in a clean way", you need to add the transients to the constraints and mark them as nullable: true.
So to add:
static constraints = {
...
isActionRun(nullable: true)
isActionDownload(nullable: true)
}
kchelstowski
approved these changes
Jun 19, 2023
awalkowiak
requested changes
Jun 19, 2023
| categories(nullable: true) | ||
| includeSubcategories(nullable: true) | ||
| actionButton(nullable: true, inList: ["run", "download"]) | ||
| isActionRun(nullable: true) |
Collaborator
There was a problem hiding this comment.
I think these two lines should not be here. I think you said, that adding ?: false to getters was enough.
awalkowiak
approved these changes
Jun 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.