Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
6ead5155
Unverified
Commit
6ead5155
authored
10 months ago
by
John Swanson
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add collection ID to `/collection/:id/items` (#41757)
Pretty much does what it says on the tin.
parent
c4134211
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/api/collection.clj
+1
-0
1 addition, 0 deletions
src/metabase/api/collection.clj
test/metabase/api/collection_test.clj
+2
-1
2 additions, 1 deletion
test/metabase/api/collection_test.clj
with
3 additions
and
1 deletion
src/metabase/api/collection.clj
+
1
−
0
View file @
6ead5155
...
@@ -635,6 +635,7 @@
...
@@ -635,6 +635,7 @@
`post-process-collection-children`. Must respect the order passed in."
`post-process-collection-children`. Must respect the order passed in."
[
collection
rows
]
[
collection
rows
]
(
->>
(
map-indexed
(
fn
[
i
row
]
(
vary-meta
row
assoc
::index
i
))
rows
)
;; keep db sort order
(
->>
(
map-indexed
(
fn
[
i
row
]
(
vary-meta
row
assoc
::index
i
))
rows
)
;; keep db sort order
(
map
#
(
assoc
%
:collection_id
(
:id
collection
)))
(
map
remove-unwanted-keys
)
(
map
remove-unwanted-keys
)
(
group-by
:model
)
(
group-by
:model
)
(
into
[]
(
into
[]
...
...
This diff is collapsed.
Click to expand it.
test/metabase/api/collection_test.clj
+
2
−
1
View file @
6ead5155
...
@@ -647,7 +647,8 @@
...
@@ -647,7 +647,8 @@
:moderator_id
user-id
:moderator_id
user-id
:most_recent
true
}]
:most_recent
true
}]
(
is
(
=
(
mt/obj->json->obj
(
is
(
=
(
mt/obj->json->obj
[{
:id
card-id
[{
:collection_id
(
:id
collection
)
:id
card-id
:location
nil
:location
nil
:name
(
:name
card
)
:name
(
:name
card
)
:collection_position
nil
:collection_position
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment