-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Set called_station_id max-length to 253 chars #467
- Set max_length attribute of called_station_id to 253 according to best practices - Ensured serializers enforce this constraint in the API to avoid uncaught exceptions Fixes #467
- Loading branch information
Showing
5 changed files
with
142 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
openwisp_radius/migrations/0039_alter_radiusaccounting_called_station_id_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Generated by Django 4.2.17 on 2024-12-23 15:24 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("openwisp_radius", "0038_clean_fallbackfields"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="radiusaccounting", | ||
name="called_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="calledstationid", | ||
db_index=True, | ||
max_length=253, | ||
null=True, | ||
verbose_name="called station ID", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="radiusaccounting", | ||
name="calling_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="callingstationid", | ||
db_index=True, | ||
max_length=253, | ||
null=True, | ||
verbose_name="calling station ID", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="radiuspostauth", | ||
name="called_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="calledstationid", | ||
max_length=253, | ||
null=True, | ||
verbose_name="called station ID", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="radiuspostauth", | ||
name="calling_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="callingstationid", | ||
max_length=253, | ||
null=True, | ||
verbose_name="calling station ID", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...nwisp2/sample_radius/migrations/0030_alter_radiusaccounting_called_station_id_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Generated by Django 4.2.17 on 2025-01-08 15:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
( | ||
"sample_radius", | ||
"0029_alter_organizationradiussettings_allowed_mobile_prefixes_and_more", | ||
), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="radiusaccounting", | ||
name="called_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="calledstationid", | ||
db_index=True, | ||
max_length=253, | ||
null=True, | ||
verbose_name="called station ID", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="radiusaccounting", | ||
name="calling_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="callingstationid", | ||
db_index=True, | ||
max_length=253, | ||
null=True, | ||
verbose_name="calling station ID", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="radiuspostauth", | ||
name="called_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="calledstationid", | ||
max_length=253, | ||
null=True, | ||
verbose_name="called station ID", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="radiuspostauth", | ||
name="calling_station_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_column="callingstationid", | ||
max_length=253, | ||
null=True, | ||
verbose_name="calling station ID", | ||
), | ||
), | ||
] |