Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
6
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
6477590c
Commit
6477590c
authored
4 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Fix devalidation
parent
751147f2
No related branches found
No related tags found
1 merge request
!76
Transfer front
Pipeline
#8124
passed with stages
in 4 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/note/api/serializers.py
+4
-0
4 additions, 0 deletions
apps/note/api/serializers.py
apps/note/tables.py
+1
-1
1 addition, 1 deletion
apps/note/tables.py
with
5 additions
and
1 deletion
apps/note/api/serializers.py
+
4
−
0
View file @
6477590c
...
...
@@ -111,6 +111,10 @@ class ConsumerSerializer(serializers.ModelSerializer):
fields
=
'
__all__
'
def
get_note
(
self
,
obj
):
"""
Display information about the associated note
"""
# 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
)
...
...
This diff is collapsed.
Click to expand it.
apps/note/tables.py
+
1
−
1
View file @
6477590c
...
...
@@ -55,7 +55,7 @@ class HistoryTable(tables.Table):
"
class
"
:
lambda
record
:
str
(
record
.
valid
).
lower
()
+
'
validate
'
,
"
data-toggle
"
:
"
tooltip
"
,
"
title
"
:
lambda
record
:
_
(
"
Click to invalidate
"
)
if
record
.
valid
else
_
(
"
Click to validate
"
),
"
onclick
"
:
lambda
record
:
'
in
_validate(
'
+
str
(
record
.
id
)
+
'
,
'
+
str
(
record
.
valid
).
lower
()
+
'
)
'
,
"
onclick
"
:
lambda
record
:
'
de
_validate(
'
+
str
(
record
.
id
)
+
'
,
'
+
str
(
record
.
valid
).
lower
()
+
'
)
'
,
"
onmouseover
"
:
lambda
record
:
'
$(
"
#invalidity_reason_
'
+
str
(
record
.
id
)
+
'"
).show();$(
"
#invalidity_reason_
'
+
str
(
record
.
id
)
+
'"
).focus();
'
,
...
...
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