Skip to content

Commit

Permalink
Removed description from project
Browse files Browse the repository at this point in the history
  • Loading branch information
PukieDiederik committed Dec 27, 2023
1 parent 9356e35 commit 1a2a6e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.7 on 2023-12-27 08:38

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('portfolio42_api', '0010_translationlanguage_projecttranslation'),
]

operations = [
migrations.RemoveField(
model_name='project',
name='description',
),
]
1 change: 0 additions & 1 deletion backend/portfolio42_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def update(cursus):
# Project model
class Project(IntraBaseModel):
name = models.CharField(max_length=50)
description = models.TextField(max_length=2000)
exam = models.BooleanField(default=False)
solo = models.BooleanField(default=True)

Expand Down
1 change: 0 additions & 1 deletion backend/portfolio42_api/serializers/ProjectSerializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def to_representation(self, instance):
for lang in langs:
try:
pt = ProjectTranslation.objects.get(id_language__name_short=lang,id_project=instance)
print(f"found correct ${lang}")
instance_data['description'] = pt.description
instance_data['description_bonus'] = pt.description_bonus
instance_data['append_bonus'] = pt.bonus_append
Expand Down

0 comments on commit 1a2a6e6

Please sign in to comment.