Commit 4c71c73b authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

update README and fix flake8

parent c32cff22
Pipeline #14595 passed with stages
in 2 minutes and 40 seconds
# Metagenedb # Metagenedb
[![pipeline status](https://gitlab.pasteur.fr/metagenomics/metagenedb/badges/master/pipeline.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/metagenomics/metagenedb/badges/master/coverage.svg)](https://gitlab.pasteur.fr/metagenomics/metagenedb/commits/dev) [![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 Django based project to build genes catalog and tools
to play with it and contact external services. to play with it and contact external services.
......
...@@ -20,6 +20,7 @@ class Gene(models.Model): ...@@ -20,6 +20,7 @@ class Gene(models.Model):
class Meta: class Meta:
ordering = ['-gene_id'] ordering = ['-gene_id']
class GeneFunction(models.Model): class GeneFunction(models.Model):
gene = models.ForeignKey(Gene, on_delete=models.CASCADE) gene = models.ForeignKey(Gene, on_delete=models.CASCADE)
function = models.ForeignKey(Function, on_delete=models.CASCADE) function = models.ForeignKey(Function, on_delete=models.CASCADE)
......
...@@ -16,6 +16,10 @@ class GeneListSerializer(BulkListSerializer): ...@@ -16,6 +16,10 @@ class GeneListSerializer(BulkListSerializer):
class Meta: class Meta:
model = Gene model = Gene
def create(self, validated_data):
instances = super().create(validated_data)
return instances
class GeneSerializer(serializers.ModelSerializer): class GeneSerializer(serializers.ModelSerializer):
functions = FunctionSerializer( functions = FunctionSerializer(
......
Supports Markdown
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