Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20
Commits
fa9159bb
Commit
fa9159bb
authored
4 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Alias pk != Note pk
parent
45492551
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!86
Pre-beta fixes
Pipeline
#8265
failed with stages
in 1 minute and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/note/api/serializers.py
+1
-2
1 addition, 2 deletions
apps/note/api/serializers.py
with
1 addition
and
2 deletions
apps/note/api/serializers.py
+
1
−
2
View file @
fa9159bb
...
...
@@ -118,9 +118,8 @@ class ConsumerSerializer(serializers.ModelSerializer):
"""
# If the user has no right to see the note, then we only display the note identifier
if
PermissionBackend
.
check_perm
(
get_current_authenticated_user
(),
"
note.view_note
"
,
obj
.
note
):
print
(
obj
.
pk
)
return
NotePolymorphicSerializer
().
to_representation
(
obj
.
note
)
return
dict
(
id
=
obj
.
id
)
return
dict
(
id
=
obj
.
note
.
id
)
def
get_email_confirmed
(
self
,
obj
):
if
isinstance
(
obj
.
note
,
NoteUser
):
...
...
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