Skip to content

Commit ba9c61f

Browse files
authored
Fix issue where seed was intermittently failing part way through, causing no transactions to be added . (#5461)
1 parent b4460c7 commit ba9c61f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

db/seeds.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def random_record_for_org(org, klass)
7676
end
7777

7878
def seed_random_item_with_name(organization, name)
79-
base_items = BaseItem.all.map(&:to_h)
79+
# Once we break the link between BaseItem and Item, we can remove the 'kit' BaseItem, and change this to BaseItem.all CLF 20251202
80+
base_items = BaseItem.where.not(reporting_category: nil).map(&:to_h)
8081
base_item = Array.wrap(base_items).sample
8182
base_item[:name] = name
8283
organization.seed_items(base_item)

0 commit comments

Comments
 (0)