Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Castellum
castellum_scheduler
Commits
020f3461
Commit
020f3461
authored
Nov 10, 2020
by
Bengfort
Browse files
exclude booked timeslots in invitation form
parent
9ef9109d
Pipeline
#7740
passed with stages
in 2 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scheduler/main/views.py
View file @
020f3461
...
...
@@ -21,6 +21,7 @@ from collections import OrderedDict
from
django.conf
import
settings
from
django.contrib.auth.mixins
import
LoginRequiredMixin
from
django.contrib
import
messages
from
django.db
import
models
from
django.core.exceptions
import
PermissionDenied
from
django.http
import
HttpResponse
from
django.http
import
JsonResponse
...
...
@@ -89,7 +90,9 @@ class InvitationUpdateView(UpdateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
().
get_context_data
(
**
kwargs
)
timeslots
=
list
(
self
.
object
.
schedule
.
timeslot_set
.
all
())
timeslots
=
list
(
self
.
object
.
schedule
.
timeslot_set
.
filter
(
models
.
Q
(
invitation
=
None
)
|
models
.
Q
(
invitation
=
self
.
object
)
))
dates
=
[]
times
=
[]
...
...
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