Skip to content

Commit 69b7cfd

Browse files
authored
[change] Allow overriding configured RADIUS replies on MaxQuotaReached
1 parent ab159d3 commit 69b7cfd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

openwisp_radius/api/freeradius_views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,9 @@ def get_replies(self, user, organization_id):
315315
continue
316316
# if max is reached send access rejected + reply message
317317
except MaxQuotaReached as max_quota:
318-
data = self.reject_attributes.copy()
319-
data["Reply-Message"] = max_quota.reply_message
318+
data.update(self.reject_attributes.copy())
319+
if "Reply-Message" not in data:
320+
data["Reply-Message"] = max_quota.reply_message
320321
return data, self.max_quota_status
321322
# avoid crashing on unexpected runtime errors
322323
except Exception as e:

0 commit comments

Comments
 (0)