Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
chocapix-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Camille MASSET
chocapix-server
Commits
92449a17
Verified
Commit
92449a17
authored
Nov 24, 2019
by
Camille MASSET
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug (temporary) with transaction pagination
parent
fbdc6251
Pipeline
#6434
failed with stage
in 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
bars_transactions/views.py
bars_transactions/views.py
+2
-3
No files found.
bars_transactions/views.py
View file @
92449a17
...
...
@@ -38,9 +38,8 @@ class TransactionFilterBackend(filters.BaseFilterBackend):
if
page
!=
0
:
page_size
=
int
(
request
.
query_params
.
get
(
'page_size'
,
10
))
queryset
=
queryset
[(
page
-
1
)
*
page_size
:
page
*
page_size
]
return
queryset
return
Response
(
"Please parametrize your request."
,
400
)
# TODO: raise exceptions.ValidationError("Please paginate your request.")
return
queryset
class
TransactionViewSet
(
viewsets
.
ModelViewSet
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment