Skip to content

Commit f553f60

Browse files
committed
Fix many nested records failing to save
This happened when new many nested record on an update form was deleted on the form, and the form was finally submitted.
1 parent 099951b commit f553f60

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased] -
9+
10+
### Fixed
11+
- Fix new many nested records failing to save when they were deleted on the form before form submission
12+
813
## [0.21.3] - 2025-08-30
914

1015
### Fixed

src/bill/operations/mixins/needs_line_items.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module Bill::NeedsLineItems
3232
end
3333

3434
def line_items_to_delete
35-
keyed_line_items - line_items_to_save
35+
(keyed_line_items - line_items_to_save).select(&.["id"]?.presence)
3636
end
3737

3838
def line_items_to_save

0 commit comments

Comments
 (0)