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
8d05ac97
Commit
8d05ac97
authored
Jan 09, 2025
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#7316 : trigger error when trying to add makeup which would unsubscribe a member from admin bdm
parent
02ee410b
Pipeline
#4047
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
admin.py
members/admin.py
+6
-0
No files found.
members/admin.py
View file @
8d05ac97
...
...
@@ -409,6 +409,12 @@ def update_members_makeups(request):
return
JsonResponse
(
error
,
status
=
400
)
makeup_change_count
=
target_makeups_nb
-
cs
.
get_member_makeups_to_do
(
cm
.
id
)
members_data
[
member_data
[
"member_id"
]][
"points_diff"
]
=
-
makeup_change_count
points_target
=
cm
.
get_member_points
(
"standard"
)
-
makeup_change_count
if
points_target
<=
unsubscription_limit
:
error
=
[]
error
[
"error"
]
\
=
"L'ajout de rattrapage a été annulé car il provoquerait la désinscription d'un membre."
return
JsonResponse
(
error
,
status
=
400
)
res
[
"res"
]
=
[]
update_members_makeups_core
(
members_data
,
res
)
...
...
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