Skip to content

Commit e2f8428

Browse files
authored
fix: increase the max_length to 255 for api key fields (#518)
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent abb86f9 commit e2f8428

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 6.0.4 on 2026-04-16 12:20
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('dje', '0014_apitoken_data'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='dataspaceconfiguration',
15+
name='purldb_api_key',
16+
field=models.CharField(blank=True, help_text="If your organization's private PurlDB instance requires an API key for access, provide it here. If not, you can leave this field empty.", max_length=255, verbose_name='PurlDB API key'),
17+
),
18+
migrations.AlterField(
19+
model_name='dataspaceconfiguration',
20+
name='scancodeio_api_key',
21+
field=models.CharField(blank=True, help_text="If your organization's private ScanCode.io instance requires an API key for access, provide it here. Otherwise, you can leave this field empty.", max_length=255, verbose_name='ScanCode.io API key'),
22+
),
23+
migrations.AlterField(
24+
model_name='dataspaceconfiguration',
25+
name='vulnerablecode_api_key',
26+
field=models.CharField(blank=True, help_text='If your private VulnerableCode instance requires an API key for access, input it here. If not, you can leave this field blank.', max_length=255, verbose_name='VulnerableCode API key'),
27+
),
28+
]

dje/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ class DataspaceConfiguration(DataspaceForeignKeyValidationMixin, models.Model):
490490

491491
scancodeio_api_key = models.CharField(
492492
_("ScanCode.io API key"),
493-
max_length=40,
493+
max_length=255,
494494
blank=True,
495495
help_text=_(
496496
"If your organization's private ScanCode.io instance requires an API key "
@@ -511,7 +511,7 @@ class DataspaceConfiguration(DataspaceForeignKeyValidationMixin, models.Model):
511511

512512
vulnerablecode_api_key = models.CharField(
513513
_("VulnerableCode API key"),
514-
max_length=40,
514+
max_length=255,
515515
blank=True,
516516
help_text=_(
517517
"If your private VulnerableCode instance requires an API key for access, "
@@ -543,7 +543,7 @@ class DataspaceConfiguration(DataspaceForeignKeyValidationMixin, models.Model):
543543

544544
purldb_api_key = models.CharField(
545545
_("PurlDB API key"),
546-
max_length=40,
546+
max_length=255,
547547
blank=True,
548548
help_text=_(
549549
"If your organization's private PurlDB instance requires an API key for "

0 commit comments

Comments
 (0)