Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SMASCH
scheduling-system
Merge requests
!117
Resolve "extend worker class"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "extend worker class"
183-extend-worker-class
into
master
Overview
0
Commits
22
Pipelines
3
Changes
37
Merged
Piotr Gawron
requested to merge
183-extend-worker-class
into
master
7 years ago
Overview
0
Commits
22
Pipelines
3
Changes
37
Expand
Closes
#183 (closed)
Edited
7 years ago
by
Piotr Gawron
0
0
Merge request reports
Compare
master
version 1
02a4d860
7 years ago
master (base)
and
latest version
latest version
7ba80cd8
22 commits,
7 years ago
version 1
02a4d860
21 commits,
7 years ago
37 files
+
703
−
346
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
37
Search (e.g. *.vue) (Ctrl+P)
smash/web/api_views/daily_planning.py
+
4
−
3
Options
@@ -8,6 +8,7 @@ from django.http import JsonResponse
from
django.shortcuts
import
get_object_or_404
from
web.models
import
Appointment
,
AppointmentTypeLink
,
Worker
,
Availability
,
Holiday
from
web.models.worker_study_role
import
WORKER_STAFF
from
web.views
import
e500_error
from
web.views.notifications
import
get_filter_locations
@@ -300,9 +301,9 @@ def events(request, date):
def
get_workers_for_daily_planning
(
request
):
result
=
Worker
.
objects
.
filter
(
locations__in
=
get_filter_locations
(
request
.
user
)).
\
filter
(
user__is_active
=
True
).
exclude
(
role
=
Worker
.
ROLE_CHOICES_SECRETARY
).
distinct
()
result
=
Worker
.
get_workers_by_worker_type
(
WORKER_STAFF
).
filter
(
locations__in
=
get_filter_locations
(
request
.
user
)).
filter
(
user__is_active
=
True
).
distinct
()
return
result
Loading