Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
ots
hypha
Commits
d2b36266
Commit
d2b36266
authored
6 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
Replace the round and lab query set with the new correct one
parent
9d386c2b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentech/apply/funds/api_views.py
+3
-8
3 additions, 8 deletions
opentech/apply/funds/api_views.py
with
3 additions
and
8 deletions
opentech/apply/funds/api_views.py
+
3
−
8
View file @
d2b36266
...
@@ -5,14 +5,11 @@ from rest_framework.response import Response
...
@@ -5,14 +5,11 @@ from rest_framework.response import Response
from
rest_framework.exceptions
import
PermissionDenied
,
ValidationError
from
rest_framework.exceptions
import
PermissionDenied
,
ValidationError
from
django_filters
import
rest_framework
as
filters
from
django_filters
import
rest_framework
as
filters
from
wagtail.core.models
import
Page
from
opentech.api.pagination
import
StandardResultsSetPagination
from
opentech.api.pagination
import
StandardResultsSetPagination
from
opentech.apply.activity.models
import
Activity
,
COMMENT
from
opentech.apply.activity.models
import
Activity
,
COMMENT
from
opentech.apply.activity.messaging
import
messenger
,
MESSAGES
from
opentech.apply.activity.messaging
import
messenger
,
MESSAGES
from
.models
import
ApplicationSubmission
from
.models
import
ApplicationSubmission
,
RoundsAndLabs
from
.models.applications
import
SubmittableStreamForm
from
.serializers
import
(
from
.serializers
import
(
CommentSerializer
,
CommentSerializer
,
CommentCreateSerializer
,
CommentCreateSerializer
,
...
@@ -34,8 +31,7 @@ class RoundLabFilter(filters.ModelChoiceFilter):
...
@@ -34,8 +31,7 @@ class RoundLabFilter(filters.ModelChoiceFilter):
class
SubmissionsFilter
(
filters
.
FilterSet
):
class
SubmissionsFilter
(
filters
.
FilterSet
):
# TODO replace with better call to Round and Lab base class
round
=
RoundLabFilter
(
queryset
=
RoundsAndLabs
.
objects
.
all
())
round
=
RoundLabFilter
(
queryset
=
Page
.
objects
.
type
(
SubmittableStreamForm
))
status
=
filters
.
MultipleChoiceFilter
(
choices
=
PHASES
)
status
=
filters
.
MultipleChoiceFilter
(
choices
=
PHASES
)
active
=
filters
.
BooleanFilter
(
method
=
'
filter_active
'
)
active
=
filters
.
BooleanFilter
(
method
=
'
filter_active
'
)
...
@@ -92,8 +88,7 @@ class SubmissionAction(generics.RetrieveAPIView):
...
@@ -92,8 +88,7 @@ class SubmissionAction(generics.RetrieveAPIView):
class
RoundLabDetail
(
generics
.
RetrieveAPIView
):
class
RoundLabDetail
(
generics
.
RetrieveAPIView
):
# TODO replace with better call to Round and Lab base class
queryset
=
RoundsAndLabs
.
objects
.
all
()
queryset
=
Page
.
objects
.
type
(
SubmittableStreamForm
)
serializer_class
=
RoundLabSerializer
serializer_class
=
RoundLabSerializer
permission_classes
=
(
permission_classes
=
(
permissions
.
IsAuthenticated
,
IsApplyStaffUser
,
permissions
.
IsAuthenticated
,
IsApplyStaffUser
,
...
...
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