Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
bc2581e2
Commit
bc2581e2
authored
Mar 09, 2017
by
Administrator
Browse files
Use constructor of Meta correctly
parent
36ff1a14
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/database.py
View file @
bc2581e2
...
@@ -201,7 +201,7 @@ class Protocol(DatabaseModel):
...
@@ -201,7 +201,7 @@ class Protocol(DatabaseModel):
for
default_meta
in
self
.
protocoltype
.
metas
:
for
default_meta
in
self
.
protocoltype
.
metas
:
if
default_meta
.
key
in
remarks
:
if
default_meta
.
key
in
remarks
:
value
=
remarks
[
default_meta
.
key
].
value
.
strip
()
value
=
remarks
[
default_meta
.
key
].
value
.
strip
()
meta
=
Meta
(
self
.
id
,
default_meta
.
name
,
value
)
meta
=
Meta
(
protocol_id
=
self
.
id
,
name
=
default_meta
.
name
,
value
=
value
)
db
.
session
.
add
(
meta
)
db
.
session
.
add
(
meta
)
db
.
session
.
commit
()
db
.
session
.
commit
()
...
...
Write
Preview
Supports
Markdown
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