Skip to content

Commit daeebfa

Browse files
committed
Fix string normalization
1 parent 4bb5066 commit daeebfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/lunchflow_item/importer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def import
2929
accounts_failed = 0
3030

3131
if accounts_data[:accounts].present?
32-
# Get all existing lunchflow account IDs for this item
33-
existing_account_ids = lunchflow_item.lunchflow_accounts.pluck(:account_id)
32+
# Get all existing lunchflow account IDs for this item (normalize to strings for comparison)
33+
existing_account_ids = lunchflow_item.lunchflow_accounts.pluck(:account_id).map(&:to_s)
3434

3535
accounts_data[:accounts].each do |account_data|
3636
account_id = account_data[:id]&.to_s

0 commit comments

Comments
 (0)