def get_gene_ids(model):
    """
    This function returns a list of IDs of all genes in the model.

    Parameters
    ----------
    model : cobra.core.Model.Model
        A cobra model.

    Returns
    -------
    genes : list
        A list containing all IDs of genes in the model.
    """
    genes = []
    for gene in model.genes:
        genes.append(gene.id)
    genes = list(set(genes))
    return genes
