Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
016f6566
Commit
016f6566
authored
5 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
make sure we do not crash on best activity during compound validation
fix #207
parent
271245df
No related branches found
No related tags found
1 merge request
!13
Master
Pipeline
#28623
passed
5 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/models.py
+5
-1
5 additions, 1 deletion
ippisite/ippidb/models.py
with
5 additions
and
1 deletion
ippisite/ippidb/models.py
+
5
−
1
View file @
016f6566
...
...
@@ -862,7 +862,11 @@ class Compound(AutoFillableModel):
best_pXC50_activity
=
self
.
best_activity
if
best_pXC50_activity
is
None
:
return
None
return
self
.
compoundactivityresult_set
.
filter
(
activity
=
best_pXC50_activity
)[
0
]
best_cars
=
self
.
compoundactivityresult_set
.
filter
(
activity
=
best_pXC50_activity
)
if
len
(
best_cars
)
>
0
:
return
best_cars
[
0
]
else
:
return
None
@property
def
bioch_tests_count
(
self
):
...
...
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