Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iPPIDB
ippidb-web
Commits
1cc8b149
Commit
1cc8b149
authored
Mar 10, 2021
by
Fabien MAREUIL
Browse files
too many interactfiles, use filter and update
parent
358d16c6
Pipeline
#50441
failed with stages
in 25 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ippisite/ippidb/migrations/0068_auto_20210310_1052.py
View file @
1cc8b149
...
@@ -8,30 +8,25 @@ def init_isolevel(apps, schema_editor):
...
@@ -8,30 +8,25 @@ def init_isolevel(apps, schema_editor):
InteractFile
=
apps
.
get_model
(
"ippidb"
,
"InteractFile"
)
InteractFile
=
apps
.
get_model
(
"ippidb"
,
"InteractFile"
)
Chains
=
Chain
.
objects
.
all
()
Chains
=
Chain
.
objects
.
all
()
if
Chains
:
if
Chains
:
for
Chain
in
Chains
:
Chain
.
update
(
default_isolevel
=
0.5
)
Chain
.
default_isolevel
=
0.5
InteractFiles
=
InteractFile
.
objects
.
filter
(
label
=
"all"
)
Chain
.
save
()
InteractFiles
=
InteractFile
.
objects
.
all
()
if
InteractFiles
:
if
InteractFiles
:
for
InteractFile
in
InteractFiles
:
InteractFiles
.
update
(
default_isolevel
=
0.7
)
if
InteractFile
.
label
==
"all"
:
InteractFiles
=
InteractFile
.
objects
.
filter
(
label
=
"hydrophobic"
)
InteractFile
.
default_isolevel
=
0.7
if
InteractFiles
:
InteractFile
.
save
()
InteractFiles
.
update
(
default_isolevel
=
0.3
)
if
InteractFile
.
label
==
"hydrophobic"
:
InteractFiles
=
InteractFile
.
objects
.
filter
(
label
=
"hbond donor-acceptor"
)
InteractFile
.
default_isolevel
=
0.3
if
InteractFiles
:
InteractFile
.
save
()
InteractFiles
.
update
(
default_isolevel
=
0.3
)
if
InteractFile
.
label
==
"hbond donor-acceptor"
:
InteractFiles
=
InteractFile
.
objects
.
filter
(
label
=
"negative"
)
InteractFile
.
default_isolevel
=
0.3
if
InteractFiles
:
InteractFile
.
save
()
InteractFiles
.
update
(
default_isolevel
=
0.08
)
if
InteractFile
.
label
==
"negative"
:
InteractFiles
=
InteractFile
.
objects
.
filter
(
label
=
"positive"
)
InteractFile
.
default_isolevel
=
0.08
if
InteractFiles
:
InteractFile
.
save
()
InteractFiles
.
update
(
default_isolevel
=
0.05
)
if
InteractFile
.
label
==
"positive"
:
InteractFiles
=
InteractFile
.
objects
.
filter
(
label
=
"backbone"
)
InteractFile
.
default_isolevel
=
0.05
if
InteractFiles
:
InteractFile
.
save
()
InteractFiles
.
update
(
default_isolevel
=
0.18
)
if
InteractFile
.
label
==
"backbone"
:
InteractFile
.
default_isolevel
=
0.18
InteractFile
.
save
()
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment