Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
My SU
Backend
API
Commits
1fcc4d36
Commit
1fcc4d36
authored
1 year ago
by
s2536528
Browse files
Options
Downloads
Patches
Plain Diff
Added method get_object in class viewsets/event.py
parent
e0c4e316
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#72315
failed
1 year ago
Stage: build
Stage: env
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/calendar/viewsets/event.py
+1
-1
1 addition, 1 deletion
apps/calendar/viewsets/event.py
with
1 addition
and
1 deletion
apps/calendar/viewsets/event.py
+
1
−
1
View file @
1fcc4d36
...
...
@@ -61,7 +61,7 @@ class EventViewSet(viewsets.ModelViewSet):
return
EventSerializer
def
get_object
(
self
):
obj
=
get_object_or_404
(
self
.
get_queryset
(),
pk
=
self
.
kwargs
[
"
id
"
])
# maybe instead of id, name ?
obj
=
get_object_or_404
(
self
.
get_queryset
(),
pk
=
self
.
kwargs
[
"
id
"
])
print
(
"
method for retrieving the object was used ! [TEST]
"
)
self
.
check_object_permissions
(
self
.
request
,
obj
)
return
obj
...
...
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