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
Metagenomics
metagenedb
Commits
b3c47f2f
Commit
b3c47f2f
authored
Dec 09, 2019
by
Kenzo-Hugo Hillion
♻
Browse files
raise exception when no functional categories available yet
parent
09458ad3
Pipeline
#19640
passed with stages
in 2 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
backend/metagenedb/apps/catalog/management/commands/create_update_eggnog.py
View file @
b3c47f2f
...
...
@@ -24,6 +24,8 @@ class ImportEggNog(object):
def
_build_functional_category_dict
(
self
):
all_categories
=
EggNogFunctionalCategory
.
objects
.
all
()
if
not
all_categories
:
raise
Exception
(
"You need to create Functional categories first."
)
self
.
functional_cat
=
{
cat
.
category_id
:
cat
for
cat
in
all_categories
}
def
link_functional_category
(
self
,
eggnog_dict
):
...
...
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