Skip to content

Commit

Permalink
make benchmark field optional for report
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan7n committed Sep 22, 2023
1 parent 9a69d0a commit 4be81b5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions server/report/migrations/0002_alter_report_benchmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 3.2.20 on 2023-09-22 14:19

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('benchmark', '0001_initial'),
('report', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='report',
name='benchmark',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='benchmark.benchmark'),
),
]
4 changes: 3 additions & 1 deletion server/report/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class Report(models.Model):
data_preparation_mlcube = models.ForeignKey(
"mlcube.MlCube", on_delete=models.PROTECT
)
benchmark = models.ForeignKey("benchmark.Benchmark", on_delete=models.CASCADE)
benchmark = models.ForeignKey(
"benchmark.Benchmark", on_delete=models.CASCADE, blank=True, null=True
)
is_valid = models.BooleanField(default=True)

contents = models.JSONField(default=dict, blank=True, null=True)
Expand Down

0 comments on commit 4be81b5

Please sign in to comment.