Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pony
tshistory_supervision
Commits
595b071aefe0
Commit
c448a886
authored
Nov 09, 2018
by
Aurélien Campéas
Browse files
insert: do not forget to pass the metadata
parent
e0530dcc30a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tshistory_supervision/tsio.py
View file @
595b071a
...
...
@@ -57,13 +57,16 @@ class TimeSerie(BaseTS):
super
().
__init__
(
*
a
,
**
kw
)
self
.
auto_store
=
BaseTS
(
namespace
=
'{}-automatic'
.
format
(
self
.
namespace
))
def
insert
(
self
,
cn
,
ts
,
name
,
author
,
_insertion_date
=
None
,
manual
=
False
):
def
insert
(
self
,
cn
,
ts
,
name
,
author
,
metadata
=
None
,
_insertion_date
=
None
,
manual
=
False
):
if
manual
:
diff
=
ts
else
:
# insert & compute diff over automatic
diff
=
self
.
auto_store
.
insert
(
cn
,
ts
,
name
,
author
,
metadata
=
metadata
,
_insertion_date
=
_insertion_date
)
if
diff
is
None
:
...
...
@@ -72,6 +75,7 @@ class TimeSerie(BaseTS):
# insert the diff over automatic or the manual edit into synthetic
a
=
super
().
insert
(
cn
,
diff
,
name
,
author
,
metadata
=
metadata
,
_insertion_date
=
_insertion_date
)
return
a
...
...
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