Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Milleville
SCODOC_R6A06
Commits
5e46d2fc
Commit
5e46d2fc
authored
3 years ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Fix: json evaluations sans dates
parent
878ea419
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models/evaluations.py
+13
-6
13 additions, 6 deletions
app/models/evaluations.py
sco_version.py
+1
-1
1 addition, 1 deletion
sco_version.py
with
14 additions
and
7 deletions
app/models/evaluations.py
+
13
−
6
View file @
5e46d2fc
...
@@ -46,16 +46,23 @@ class Evaluation(db.Model):
...
@@ -46,16 +46,23 @@ class Evaluation(db.Model):
def
__repr__
(
self
):
def
__repr__
(
self
):
return
f
"""
<Evaluation
{
self
.
id
}
{
self
.
jour
.
isoformat
()
if
self
.
jour
else
''
}
"
{
self
.
description
[
:
16
]
if
self
.
description
else
''
}
"
>
"""
return
f
"""
<Evaluation
{
self
.
id
}
{
self
.
jour
.
isoformat
()
if
self
.
jour
else
''
}
"
{
self
.
description
[
:
16
]
if
self
.
description
else
''
}
"
>
"""
def
to_dict
(
self
):
def
to_dict
(
self
)
->
dict
:
"
Représentation dict, pour json
"
e
=
dict
(
self
.
__dict__
)
e
=
dict
(
self
.
__dict__
)
e
.
pop
(
"
_sa_instance_state
"
,
None
)
e
.
pop
(
"
_sa_instance_state
"
,
None
)
# ScoDoc7 output_formators
# ScoDoc7 output_formators
e
[
"
evaluation_id
"
]
=
self
.
id
e
[
"
evaluation_id
"
]
=
self
.
id
e
[
"
jour
"
]
=
ndb
.
DateISOtoDMY
(
e
[
"
jour
"
])
e
[
"
jour
"
]
=
e
[
"
jour
"
].
strftime
(
"
%d/%m/%Y
"
)
if
e
[
"
jour
"
]
else
""
if
self
.
jour
is
None
:
e
[
"
date_debut
"
]
=
None
e
[
"
date_fin
"
]
=
None
else
:
e
[
"
date_debut
"
]
=
datetime
.
datetime
.
combine
(
e
[
"
date_debut
"
]
=
datetime
.
datetime
.
combine
(
self
.
jour
,
self
.
heure_debut
self
.
jour
,
self
.
heure_debut
or
datetime
.
time
(
0
,
0
)
).
isoformat
()
e
[
"
date_fin
"
]
=
datetime
.
datetime
.
combine
(
self
.
jour
,
self
.
heure_fin
or
datetime
.
time
(
0
,
0
)
).
isoformat
()
).
isoformat
()
e
[
"
date_fin
"
]
=
datetime
.
datetime
.
combine
(
self
.
jour
,
self
.
heure_fin
).
isoformat
()
e
[
"
numero
"
]
=
ndb
.
int_null_is_zero
(
e
[
"
numero
"
])
e
[
"
numero
"
]
=
ndb
.
int_null_is_zero
(
e
[
"
numero
"
])
e
[
"
poids
"
]
=
self
.
get_ue_poids_dict
()
# { ue_id : poids }
e
[
"
poids
"
]
=
self
.
get_ue_poids_dict
()
# { ue_id : poids }
return
evaluation_enrich_dict
(
e
)
return
evaluation_enrich_dict
(
e
)
...
...
This diff is collapsed.
Click to expand it.
sco_version.py
+
1
−
1
View file @
5e46d2fc
# -*- mode: python -*-
# -*- mode: python -*-
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
SCOVERSION
=
"
9.2.2
1
"
SCOVERSION
=
"
9.2.2
2
"
SCONAME
=
"
ScoDoc
"
SCONAME
=
"
ScoDoc
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment