We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bb5066 commit daeebfaCopy full SHA for daeebfa
app/models/lunchflow_item/importer.rb
@@ -29,8 +29,8 @@ def import
29
accounts_failed = 0
30
31
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)
+ # Get all existing lunchflow account IDs for this item (normalize to strings for comparison)
+ existing_account_ids = lunchflow_item.lunchflow_accounts.pluck(:account_id).map(&:to_s)
34
35
accounts_data[:accounts].each do |account_data|
36
account_id = account_data[:id]&.to_s
0 commit comments