Skip to content

OBGM-565 Fix accessing nested map values#4155

Merged
awalkowiak merged 2 commits intofeature/upgrade-to-grails-3.3.10from
OBGM-565-items-removed-from-shipment-when-edit-qty-on-pick-page
Jul 13, 2023
Merged

OBGM-565 Fix accessing nested map values#4155
awalkowiak merged 2 commits intofeature/upgrade-to-grails-3.3.10from
OBGM-565-items-removed-from-shipment-when-edit-qty-on-pick-page

Conversation

@drodzewicz
Copy link
Collaborator

No description provided.

@drodzewicz drodzewicz added the warn: do not merge Marks a pull request that is not yet ready to be merged label Jul 10, 2023
@drodzewicz drodzewicz force-pushed the OBGM-565-items-removed-from-shipment-when-edit-qty-on-pick-page branch from 13a49f4 to 67512ba Compare July 12, 2023 13:29
@drodzewicz drodzewicz removed the warn: do not merge Marks a pull request that is not yet ready to be merged label Jul 12, 2023
@awalkowiak awalkowiak merged commit a5ed0c2 into feature/upgrade-to-grails-3.3.10 Jul 13, 2023
@awalkowiak awalkowiak deleted the OBGM-565-items-removed-from-shipment-when-edit-qty-on-pick-page branch July 13, 2023 08:14
Copy link
Member

@jmiranda jmiranda left a comment

Choose a reason for hiding this comment

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

Nice work, @drodzewicz

bindReplenishmentData(replenishment, currentUser, currentLocation, jsonObject)
Order order = replenishmentService.createOrUpdateOrderFromReplenishment(replenishment)
if (order.hasErrors() || !order.save(flush: true)) {
if (order.hasErrors()) {
Copy link
Member

Choose a reason for hiding this comment

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

We should not be doing that check here in the controller. I think I saw that this was moved to the service in another PR and I just wanted to mention that I think is the proper approach.


Replenishment bindReplenishmentData(Replenishment replenishment, User currentUser, Location currentLocation, JSONObject jsonObject) {
bindData(replenishment, jsonObject)
bindData(replenishment, jsonObject, [exclude: ['replenishmentItems']])
Copy link
Member

Choose a reason for hiding this comment

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

A comment would be helpful here so we know why the exclude is being used.

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.

4 participants