Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Felix Blanke
AKPlanning
Commits
1661b359
Commit
1661b359
authored
3 months ago
by
Felix Blanke
Browse files
Options
Downloads
Patches
Plain Diff
Add more comments
parent
c73020b0
No related branches found
No related tags found
1 merge request
!5
Refactor main
Pipeline
#266771
passed
3 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AKModel/views/ak.py
+5
-0
5 additions, 0 deletions
AKModel/views/ak.py
with
5 additions
and
0 deletions
AKModel/views/ak.py
+
5
−
0
View file @
1661b359
...
@@ -125,9 +125,12 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
...
@@ -125,9 +125,12 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
for
timeslot
in
block
:
for
timeslot
in
block
:
time_constraints
=
[]
time_constraints
=
[]
# if reso_deadline is set and timeslot ends before it,
# add fulfilled time constraint 'resolution'
if
self
.
event
.
reso_deadline
is
None
or
timeslot
.
avail
.
end
<
self
.
event
.
reso_deadline
:
if
self
.
event
.
reso_deadline
is
None
or
timeslot
.
avail
.
end
<
self
.
event
.
reso_deadline
:
time_constraints
.
append
(
"
resolution
"
)
time_constraints
.
append
(
"
resolution
"
)
# add fulfilled time constraints for all AKs that cannot happen during full event
time_constraints
.
extend
([
time_constraints
.
extend
([
f
"
availability-ak-
{
ak_id
}
"
f
"
availability-ak-
{
ak_id
}
"
for
ak_id
,
availabilities
in
ak_availabilities
.
items
()
for
ak_id
,
availabilities
in
ak_availabilities
.
items
()
...
@@ -136,11 +139,13 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
...
@@ -136,11 +139,13 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
or
self
.
_test_ak_fixed_in_slot
(
ak_id
,
timeslot
.
avail
,
ak_fixed
)
or
self
.
_test_ak_fixed_in_slot
(
ak_id
,
timeslot
.
avail
,
ak_fixed
)
)
)
])
])
# add fulfilled time constraints for all persons that are not available for full event
time_constraints
.
extend
([
time_constraints
.
extend
([
f
"
availability-person-
{
person_id
}
"
f
"
availability-person-
{
person_id
}
"
for
person_id
,
availabilities
in
person_availabilities
.
items
()
for
person_id
,
availabilities
in
person_availabilities
.
items
()
if
self
.
_test_add_constraint
(
timeslot
.
avail
,
availabilities
)
if
self
.
_test_add_constraint
(
timeslot
.
avail
,
availabilities
)
])
])
# add fulfilled time constraints for all rooms that are not available for full event
time_constraints
.
extend
([
time_constraints
.
extend
([
f
"
availability-room-
{
room_id
}
"
f
"
availability-room-
{
room_id
}
"
for
room_id
,
availabilities
in
room_availabilities
.
items
()
for
room_id
,
availabilities
in
room_availabilities
.
items
()
...
...
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