You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ka...@apache.org on 2021/08/20 04:35:19 UTC

[fineract-credit-scorecard] branch develop updated: Make algorithm field nullable

This is an automated email from the ASF dual-hosted git repository.

kaze pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-credit-scorecard.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5fb9339  Make algorithm field nullable
5fb9339 is described below

commit 5fb933953251eaae52e732233da74b7b5d5169dd
Author: Nasser Kaze <ka...@outlook.com>
AuthorDate: Fri Aug 20 05:35:08 2021 +0100

    Make algorithm field nullable
---
 .../0002_alter_predictionrequest_algorithm.py         | 19 +++++++++++++++++++
 api/models.py                                         |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/api/migrations/0002_alter_predictionrequest_algorithm.py b/api/migrations/0002_alter_predictionrequest_algorithm.py
new file mode 100644
index 0000000..b80cf0d
--- /dev/null
+++ b/api/migrations/0002_alter_predictionrequest_algorithm.py
@@ -0,0 +1,19 @@
+# Generated by Django 3.2.1 on 2021-08-20 04:32
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('api', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='predictionrequest',
+            name='algorithm',
+            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='api.algorithm'),
+        ),
+    ]
diff --git a/api/models.py b/api/models.py
index 3fffed5..5b994e3 100644
--- a/api/models.py
+++ b/api/models.py
@@ -91,7 +91,7 @@ class PredictionRequest(models.Model):
     notes = models.TextField(blank=True, null=True)
     algorithm: Algorithm = models.ForeignKey(Algorithm,
                                              on_delete=models.DO_NOTHING,
-                                             blank=True)
+                                             blank=True, null=True)
     created_at: date = models.DateTimeField(auto_now_add=True, blank=True)
     created_by = models.CharField(max_length=128)