Fix 500 error with long report_name
Fixes 500 error, when run_name + iso_time > 100 symbols
Related-PROD: PRODX-6279
Change-Id: I62cf19f7474b229412c8e2520c5a332476502b5a
diff --git a/testrail_bot/control/migrations/0013_auto_20200721_1248.py b/testrail_bot/control/migrations/0013_auto_20200721_1248.py
new file mode 100644
index 0000000..19b5632
--- /dev/null
+++ b/testrail_bot/control/migrations/0013_auto_20200721_1248.py
@@ -0,0 +1,19 @@
+# Generated by Django 3.0.7 on 2020-07-21 12:48
+
+import django.core.files.storage
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('control', '0012_auto_20200717_0936'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='report',
+ name='path',
+ field=models.FileField(blank=True, max_length=500, null=True, storage=django.core.files.storage.FileSystemStorage(), upload_to=''),
+ ),
+ ]
diff --git a/testrail_bot/control/models.py b/testrail_bot/control/models.py
index fc4af58..b79836a 100644
--- a/testrail_bot/control/models.py
+++ b/testrail_bot/control/models.py
@@ -17,7 +17,7 @@
class Report(models.Model):
- path = models.FileField(storage=fs, null=True, blank=True)
+ path = models.FileField(storage=fs, null=True, blank=True, max_length=500)
test_run = models.ForeignKey(TestRun, on_delete=models.CASCADE)
report_name = models.CharField(max_length=300)
finished = models.BooleanField(default=False)