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
deb54845
Commit
deb54845
authored
Dec 16, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1828 Fix history bug
parent
a6493b55
Pipeline
#1656
passed with stage
in 1 minute 34 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
models.py
members_space/models.py
+5
-4
No files found.
members_space/models.py
View file @
deb54845
...
@@ -36,7 +36,7 @@ class CagetteMembersSpace(models.Model):
...
@@ -36,7 +36,7 @@ class CagetteMembersSpace(models.Model):
try
:
try
:
cond
=
[
cond
=
[
[
'partner_id'
,
'='
,
partner_id
],
[
'partner_id'
,
'='
,
partner_id
],
[
'
create_date
'
,
'>'
,
date_from
],
[
'
date_begin
'
,
'>'
,
date_from
],
[
'date_begin'
,
'<'
,
today
],
[
'date_begin'
,
'<'
,
today
],
[
'state'
,
'!='
,
'draft'
],
[
'state'
,
'!='
,
'draft'
],
[
'state'
,
'!='
,
'open'
],
[
'state'
,
'!='
,
'open'
],
...
@@ -88,10 +88,10 @@ class CagetteMembersSpace(models.Model):
...
@@ -88,10 +88,10 @@ class CagetteMembersSpace(models.Model):
res
=
res
+
[]
res
=
res
+
[]
# Add amnesty line
# Add amnesty line
is_amnesty
=
getattr
(
settings
,
'AMNISTIE_DATE'
,
'false'
)
is_amnesty
=
getattr
(
settings
,
'AMNISTIE_DATE'
,
False
)
company_code
=
getattr
(
settings
,
'COMPANY_CODE'
,
''
)
company_code
=
getattr
(
settings
,
'COMPANY_CODE'
,
''
)
if
is_amnesty
and
company_code
==
"lacagette"
:
if
is_amnesty
and
company_code
==
"lacagette"
:
amnesty
=
{}
amnesty
=
{}
amnesty
[
'is_amnesty'
]
=
True
amnesty
[
'is_amnesty'
]
=
True
amnesty
[
'create_date'
]
=
is_amnesty
amnesty
[
'create_date'
]
=
is_amnesty
amnesty
[
'date_begin'
]
=
is_amnesty
amnesty
[
'date_begin'
]
=
is_amnesty
...
@@ -107,7 +107,7 @@ class CagetteMembersSpace(models.Model):
...
@@ -107,7 +107,7 @@ class CagetteMembersSpace(models.Model):
paginated_res
=
res
[
offset
:
end_index
]
paginated_res
=
res
[
offset
:
end_index
]
except
Exception
as
e
:
except
Exception
as
e
:
print
(
str
(
e
))
coop_logger
.
error
(
"get_shifts_history :
%
s"
,
str
(
e
))
return
paginated_res
return
paginated_res
\ No newline at end of file
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