Skip to content

Commit

Permalink
[fix] Fixed FreeRADIUS PostAuthView returning 500 error openwisp#467
Browse files Browse the repository at this point in the history
Set the max_length attribute to be equal to 50 on the called_station_id
field, so that it doesn't give a 500 error(400 error instead) every time
it exceeds 50.

Fixes openwisp#467
  • Loading branch information
Shiva953 committed Feb 18, 2024
1 parent 67fb112 commit 0ce90bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openwisp_radius/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class RadiusPostAuthSerializer(serializers.ModelSerializer):
allow_blank=True,
style={'input_type': 'password'},
)
called_station_id = serializers.CharField(required=False, allow_blank=True)
called_station_id = serializers.CharField(required=False, allow_blank=True, max_length=50)
calling_station_id = serializers.CharField(required=False, allow_blank=True)

def validate(self, data):
Expand Down

0 comments on commit 0ce90bf

Please sign in to comment.