@@ -519,25 +519,25 @@ def post(self, request, *args, **kwargs):
519519 serializer .is_valid (raise_exception = True )
520520 except ValidationError as error :
521521 if self ._is_interim_update_corner_case (error , data ):
522- return Response (None )
522+ return Response (status = status . HTTP_200_OK )
523523 raise error
524524 acct_data = self ._data_to_acct_model (serializer .validated_data .copy ())
525525 try :
526526 serializer .create (acct_data )
527527 # on large systems using mac auth roaming this could happen
528528 except IntegrityError :
529529 logger .info (f"Ignoring duplicate session { acct_data } " )
530- return Response (None , status = 200 )
530+ return Response (status = status . HTTP_200_OK )
531531 headers = self .get_success_headers (serializer .data )
532532 self .send_radius_accounting_signal (serializer .validated_data )
533- return Response (None , status = 201 , headers = headers )
533+ return Response (status = status . HTTP_201_CREATED , headers = headers )
534534 else :
535535 serializer = self .get_serializer (instance , data = data , partial = False )
536536 serializer .is_valid (raise_exception = True )
537537 acct_data = self ._data_to_acct_model (serializer .validated_data .copy ())
538538 serializer .update (instance , acct_data )
539539 self .send_radius_accounting_signal (serializer .validated_data )
540- return Response (None )
540+ return Response (status = status . HTTP_200_OK )
541541
542542 def _handle_accounting_on (self , data ):
543543 """
0 commit comments