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
e7e31447
Commit
e7e31447
authored
9 years ago
by
Cam Saul
Browse files
Options
Downloads
Patches
Plain Diff
test fix
parent
9f2b855b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/api/meta/field.clj
+6
-7
6 additions, 7 deletions
src/metabase/api/meta/field.clj
with
6 additions
and
7 deletions
src/metabase/api/meta/field.clj
+
6
−
7
View file @
e7e31447
(
ns
metabase.api.meta.field
(
:require
[
compojure.core
:refer
[
GET
PUT
POST
]]
[
medley.core
:as
m
edley
]
[
medley.core
:as
m
]
[
metabase.api.common
:refer
:all
]
[
metabase.db
:refer
:all
]
[
metabase.db.metadata-queries
:as
metadata
]
...
...
@@ -36,14 +36,13 @@
(
defendpoint
PUT
"/:id"
"Update `Field` with ID."
[
id
:as
{{
:keys
[
field_type
special_type
preview_display
description
]}
:body
}]
{
field_type
FieldType
{
field_type
FieldType
special_type
FieldSpecialType
}
(
write-check
Field
id
)
(
check-500
(
upd
Field
id
:field_type
field_type
:special_type
special_type
:preview_display
preview_display
:description
description
))
(
check-500
(
m/mapply
upd
Field
id
(
merge
{
:description
description
; you're allowed to unset description and special_type
:special_type
special_type
}
; but field_type and preview_display must be replaced
(
when
field_type
{
:field_type
field_type
})
; with new non-nil values
(
when
preview_display
{
:preview_display
preview_display
}))))
(
sel
:one
Field
:id
id
))
(
defendpoint
GET
"/:id/summary"
...
...
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