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
c08f918a
Unverified
Commit
c08f918a
authored
1 year ago
by
Cal Herries
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Dan's suggestions (#30576)
parent
a8fc67d6
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/field.clj
+1
-1
1 addition, 1 deletion
src/metabase/api/field.clj
test/metabase/api/field_test.clj
+9
-7
9 additions, 7 deletions
test/metabase/api/field_test.clj
with
10 additions
and
8 deletions
src/metabase/api/field.clj
+
1
−
1
View file @
c08f918a
...
...
@@ -71,7 +71,7 @@
;;
;; Check for permissions and throw 403 if we don't have them...
(
if
include_editable_data_model
(
api/write-check
'
Table
(
:table_id
field
))
(
api/write-check
Table
(
:table_id
field
))
(
throw-if-no-read-or-segmented-perms
field
))
;; ...but if we do, return the Field <3
field
))
...
...
This diff is collapsed.
Click to expand it.
test/metabase/api/field_test.clj
+
9
−
7
View file @
c08f918a
...
...
@@ -117,13 +117,15 @@
:nfc_path
nil
}
original-val
)))
(
let
[
;; set it
response
(
mt/user-http-request
:crowberto
:put
200
(
format
"field/%d"
field-id
)
{
:name
"something else"
:display_name
"yay"
:description
"foobar"
:semantic_type
:type/Name
:json_unfolding
true
:visibility_type
:sensitive
:nfc_path
[
"bob"
"dobbs"
]})
response
(
mt/user-http-request
:crowberto
:put
200
(
format
"field/%d"
field-id
)
{
:name
"something else"
:display_name
"yay"
:description
"foobar"
:semantic_type
:type/Name
:json_unfolding
true
:visibility_type
:sensitive
:nfc_path
[
"bob"
"dobbs"
]})
updated-val
(
simple-field-details
(
t2/select-one
Field
:id
field-id
))]
(
testing
"response body should be the updated field"
(
is
(
=
{
:name
"Field Test"
...
...
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