Skip to content
Snippets Groups Projects
Commit 4c71c73b authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion :recycle:
Browse files

update README and fix flake8

parent c32cff22
No related branches found
No related tags found
2 merge requests!59Prod,!14Resolve "Update scripts to use new `PUT` and `POST` to populate database"
Pipeline #14595 passed with stages
in 2 minutes and 40 seconds
# Metagenedb
[![pipeline status](https://gitlab.pasteur.fr/metagenomics/metagenedb/badges/master/pipeline.svg)](https://gitlab.pasteur.fr/metagenomics/metagenedb/commits/dev)
[![coverage report](https://gitlab.pasteur.fr/metagenomics/metagenedb/badges/master/coverage.svg)](https://gitlab.pasteur.fr/metagenomics/metagenedb/commits/dev)
[![pipeline status](https://gitlab.pasteur.fr/%{project_path}/badges/%{default_branch}/pipeline.svg)](https://gitlab.pasteur.fr/%{project_path}/commits/%{default_branch})
[![coverage report](https://gitlab.pasteur.fr/%{project_path}/badges/%{default_branch}/coverage.svg)](https://gitlab.pasteur.fr/%{project_path}/commits/%{default_branch})
Django based project to build genes catalog and tools
to play with it and contact external services.
......
......@@ -20,6 +20,7 @@ class Gene(models.Model):
class Meta:
ordering = ['-gene_id']
class GeneFunction(models.Model):
gene = models.ForeignKey(Gene, on_delete=models.CASCADE)
function = models.ForeignKey(Function, on_delete=models.CASCADE)
......
......@@ -16,6 +16,10 @@ class GeneListSerializer(BulkListSerializer):
class Meta:
model = Gene
def create(self, validated_data):
instances = super().create(validated_data)
return instances
class GeneSerializer(serializers.ModelSerializer):
functions = FunctionSerializer(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment