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
8fdb58dd
Commit
8fdb58dd
authored
Jan 28, 2025
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
several typo-like bug fixes
parent
a940f299
Pipeline
#4090
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
admin.py
members/admin.py
+5
-3
models.py
members/models.py
+1
-1
No files found.
members/admin.py
View file @
8fdb58dd
...
...
@@ -573,21 +573,23 @@ def shift_subscription(request):
except
MembersAppException
as
e
:
return
JsonResponse
({
"message"
:
str
(
e
)},
status
=
409
)
if
curated_data
[
"unsubscribe_first"
]:
if
res
[
"moving_from_standar
d_to_ftop"
]:
if
curated_data
[
"moving_from_st
d_to_ftop"
]:
# Hard unsubscribe (unselecting all makeups)
m
.
unsubscribe_member
()
else
:
# Unselect makeups on target shift_template
# (they would prevent new subscription)
cs
=
CagetteShift
()
cs
.
unselect_makeup
(
curated_data
[
"makeups_reg_on_target_shift_template"
])
makeup_reg_ids
=
curated_data
[
"makeups_reg_on_target_shift_template"
]
if
makeup_reg_ids
:
cs
.
unselect_makeup
(
makeup_reg_ids
)
# Perform soft unsubscribe that only unselect
# makeups of shift_template to cancel (and
# not makeups that are not linked to it)
m
.
unsubscribe_member_but_exogenous_makeups
()
reg_id
=
m
.
create_coop_shift_subscription
(
curated_data
[
"target_shift_template_id"
],
curated_data
[
"shift_type"
]
curated_data
[
"
target_
shift_type"
]
)
# Return necessary data
if
reg_id
is
not
None
:
...
...
members/models.py
View file @
8fdb58dd
...
...
@@ -1068,7 +1068,7 @@ class CagetteMember(models.Model):
def
get_makeup_registrations_ids_on_shift_template
(
self
,
shift_template_id
):
""" Get the makeup registrations that are on a shift template """
makeup_reg_ids
=
[]
res_shift_ids
=
shifts
.
fonctions
.
get_scheduled_makeups
(
self
.
api
,
partner_ids
=
[
self
.
id
])
res_shift_ids
=
shifts
.
fonctions
.
get_scheduled_makeups
(
self
.
o_
api
,
partner_ids
=
[
self
.
id
])
for
shift_reg
in
res_shift_ids
:
c
=
[[
"id"
,
"="
,
int
(
shift_reg
[
'shift_id'
][
0
])]]
f
=
[
'shift_template_id'
]
...
...
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