Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
steering
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
Container Registry
Model registry
Operate
Environments
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
AURA
steering
Commits
f5d5f453
Commit
f5d5f453
authored
1 year ago
by
Konrad Mohrfeldt
Browse files
Options
Downloads
Patches
Plain Diff
feat: add new startsBefore and endsAfter filters for timeslots API
parent
2f4472f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!28
refactor timeslot API filters
Pipeline
#7216
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program/filters.py
+10
-0
10 additions, 0 deletions
program/filters.py
with
10 additions
and
0 deletions
program/filters.py
+
10
−
0
View file @
f5d5f453
...
...
@@ -184,6 +184,11 @@ class TimeSlotFilterSet(filters.FilterSet):
"
If specified without a datetime value the current date and time is assumed.
"
),
)
starts_before
=
filters
.
DateTimeFilter
(
field_name
=
"
start
"
,
lookup_expr
=
"
lt
"
,
help_text
=
"
Only returns timeslots that start before the specified datetime.
"
,
)
starts_after
=
filters
.
DateTimeFilter
(
field_name
=
"
start
"
,
lookup_expr
=
"
gte
"
,
...
...
@@ -194,6 +199,11 @@ class TimeSlotFilterSet(filters.FilterSet):
lookup_expr
=
"
lt
"
,
help_text
=
"
Only returns timeslots that end before the specified datetime.
"
,
)
ends_after
=
filters
.
DateTimeFilter
(
field_name
=
"
end
"
,
lookup_expr
=
"
gte
"
,
help_text
=
"
Only returns timeslots that end at or after the specified datetime.
"
,
)
schedule_ids
=
IntegerInFilter
(
field_name
=
"
schedule
"
,
help_text
=
"
Return only timeslots that belong to the specified schedule(s).
"
,
...
...
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