Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
04f149b4
Commit
04f149b4
authored
Oct 06, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add origin to keep track of shifts canceled after extra shift done
parent
3368b375
Pipeline
#2408
passed with stage
in 1 minute 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
views.py
shifts/views.py
+3
-2
No files found.
shifts/views.py
View file @
04f149b4
...
...
@@ -334,10 +334,9 @@ def cancel_shift(request):
listRegister
=
[
int
(
request
.
POST
[
'idRegister'
])]
try
:
response
=
cs
.
cancel_shift
(
listRegister
)
# decrement extra_shift_done if param exists
if
'extra_shift_done'
in
request
.
POST
:
response
=
cs
.
cancel_shift
(
listRegister
,
origin
=
'memberspace extra shift done'
)
target
=
int
(
request
.
POST
[
"extra_shift_done"
])
-
1
# extra security
...
...
@@ -346,6 +345,8 @@ def cancel_shift(request):
cm
=
CagetteMember
(
partner_id
)
cm
.
update_extra_shift_done
(
target
)
else
:
response
=
cs
.
cancel_shift
(
listRegister
)
return
JsonResponse
({
"res"
:
'response'
})
except
Exception
as
e
:
...
...
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