Skip to content
Snippets Groups Projects
Commit b3c47f2f authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion ♻️
Browse files

raise exception when no functional categories available yet

parent 09458ad3
No related branches found
No related tags found
2 merge requests!59Prod,!25integration eggnog to catalog
Pipeline #19640 passed
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment