Skip to content

Commit 6797b23

Browse files
committed
[qa] Fix merge conflicts and formatting issues
- Resolve remaining git conflict markers in admin.py - Fix whitespace issue in serializers.py - Format rest-api.rst documentation
1 parent 486d958 commit 6797b23

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

docs/user/rest-api.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ When using this strategy, in the response you can find the field
857857
credentials.
858858

859859
Batch retrieve and update
860-
++++++++++++++++++++++++++
860+
+++++++++++++++++++++++++
861861

862862
.. code-block:: text
863863
@@ -870,16 +870,16 @@ Used to retrieve or update a ``RadiusBatch`` instance.
870870
.. note::
871871

872872
The ``organization`` field is **read-only** for existing batch objects
873-
and cannot be changed via the API. This is intentional as changing
874-
the organization after batch creation would be inconsistent.
873+
and cannot be changed via the API. This is intentional as changing the
874+
organization after batch creation would be inconsistent.
875875

876876
Parameters for **GET**:
877877

878-
===== ===========
878+
===== =================
879879
Param Description
880-
===== ===========
880+
===== =================
881881
id UUID of the batch
882-
===== ===========
882+
===== =================
883883

884884
Parameters for **PUT**/**PATCH** (only certain fields can be updated):
885885

openwisp_radius/admin.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,7 @@ def delete_selected_batches(self, request, queryset):
463463
)
464464

465465
def get_readonly_fields(self, request, obj=None):
466-
readonly_fields = super(RadiusBatchAdmin, self).get_readonly_fields(
467-
request, obj
468-
)
466+
readonly_fields = super().get_readonly_fields(request, obj)
469467
if obj and obj.status != "pending":
470468
return (
471469
"strategy",
@@ -476,7 +474,6 @@ def get_readonly_fields(self, request, obj=None):
476474
"users",
477475
"expiration_date",
478476
"name",
479-
"organization",
480477
"status",
481478
) + readonly_fields
482479
elif obj:

openwisp_radius/api/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def validate(self, data):
537537
"""
538538
# Remove organization_slug from data if provided (should not be changeable)
539539
data.pop("organization_slug", None)
540-
540+
541541
strategy = data.get("strategy") or (self.instance and self.instance.strategy)
542542

543543
if (

0 commit comments

Comments
 (0)