Skip to content

Error in update method (get_mgds) #8

@GLHolliday79

Description

@GLHolliday79

There appears to be an issue with the update method, specifically in the get_mgds method. At least one of the mgd ids appears to be simply "M" which causes the code to fall over.

Line 187 in database.py. I solved this by:

def get_mgds(self, hgnc):
    mgds = []

    if 'mgd_id' in hgnc:

        for mgd in hgnc['mgd_id']:

            if mgd not in self.mgds:
                try:
                    mgdid = int(mgd.split(':')[-1])
                except ValueError:
                    mgdid = None
                if mgdid:
                    self.mgds[mgd] = models.MGD(mgdid=mgdid)
                    mgds.append(self.mgds[mgd])

    return mgds

However, I'm not sure if the real issue is in the download or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions