| Total Complexity | 2 | 
| Total Lines | 26 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | #!/usr/bin/env python3 | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | """ | ||
| 4 | Created on Wed May 9 11:25:09 2018 | ||
| 5 | |||
| 6 | @author: Paolo Cozzi <[email protected]> | ||
| 7 | """ | ||
| 8 | |||
| 9 | import logging | ||
| 10 | |||
| 11 | from django.core.management.base import BaseCommand | ||
| 12 | from image_app.models import DictUberon | ||
| 13 | from zooma.helpers import annotate_organismpart | ||
| 14 | |||
| 15 | # Get an instance of a logger | ||
| 16 | logger = logging.getLogger(__name__) | ||
| 17 | |||
| 18 | |||
| 19 | class Command(BaseCommand): | ||
| 20 | help = 'Call zooma for dictbreed object. Fill table if possible' | ||
| 21 | |||
| 22 | def handle(self, *args, **options): | ||
| 23 | # get all species without a term | ||
| 24 | for part in DictUberon.objects.filter(term__isnull=True): | ||
| 25 | annotate_organismpart(part) | ||
| 26 |