Skip to content

Commit

Permalink
Fix backend tests (#42506)
Browse files Browse the repository at this point in the history
`can_write` on collection items was wrong because we didn't have a
`trashed_from_collection_id` - the refactor to ensure we didn't make
that mistake worked! 🎉
  • Loading branch information
johnswanson committed May 10, 2024
1 parent cf5316c commit 73088d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/metabase/api/collection.clj
Original file line number Diff line number Diff line change
Expand Up @@ -687,13 +687,13 @@
(->> (map-indexed (fn [i row] (vary-meta row assoc ::index i)) rows) ;; keep db sort order
(map #(assoc % :collection_id (:id collection)))
(maybe-check-permissions collection)
(map remove-unwanted-keys)
(group-by :model)
(into []
(comp (map (fn [[model rows]]
(post-process-collection-children (keyword model) collection rows)))
cat
(map coalesce-edit-info)))
(map remove-unwanted-keys)
(sort-by (comp ::index meta))))


Expand Down

0 comments on commit 73088d1

Please sign in to comment.