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
beada0b2
Commit
beada0b2
authored
Jan 31, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unsubscribed people in comitee shift search
parent
3522a711
Pipeline
#1737
passed with stage
in 1 minute 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
models.py
members/models.py
+8
-7
No files found.
members/models.py
View file @
beada0b2
...
...
@@ -743,13 +743,14 @@ class CagetteMember(models.Model):
keep_it
=
False
if
not
shift_id
is
None
and
len
(
shift_id
)
>
0
:
# Only member registred to shift_id will be returned
cond
=
[[
'id'
,
'='
,
m
[
'tmpl_reg_line_ids'
][
0
]]]
fields
=
[
'shift_template_id'
]
shift_templ_res
=
api
.
search_read
(
'shift.template.registration.line'
,
cond
,
fields
)
if
(
len
(
shift_templ_res
)
>
0
and
int
(
shift_templ_res
[
0
][
'shift_template_id'
][
0
])
==
int
(
shift_id
)):
keep_it
=
True
if
len
(
m
[
'tmpl_reg_line_ids'
])
>
0
:
cond
=
[[
'id'
,
'='
,
m
[
'tmpl_reg_line_ids'
][
0
]]]
fields
=
[
'shift_template_id'
]
shift_templ_res
=
api
.
search_read
(
'shift.template.registration.line'
,
cond
,
fields
)
if
(
len
(
shift_templ_res
)
>
0
and
int
(
shift_templ_res
[
0
][
'shift_template_id'
][
0
])
==
int
(
shift_id
)):
keep_it
=
True
else
:
keep_it
=
True
if
keep_it
is
True
:
...
...
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