Project

Profile

Help

Issue #8899

Updated by dalley over 3 years ago

The serializer rejects non-integer inputs even if `allow_null` = True. 

 ~~~ 
 (pulp) [vagrant@pulp3-source-fedora33 ~]$ http PATCH :24817/pulp/api/v3/repositories/file/file/85f819ba-4905-47f2-99eb-c35ec231743c/ retained_versions=null 
 HTTP/1.1 400 Bad Request 
 Access-Control-Expose-Headers: Correlation-ID 
 Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS 
 Connection: close 
 Content-Length: 54 
 Content-Type: application/json 
 Correlation-ID: 0b3509ee731a453fa2666c51cef5001a 
 Date: Tue, 15 Jun 2021 22:49:24 GMT 
 Server: gunicorn 
 Vary: Accept, Cookie 
 X-Frame-Options: SAMEORIGIN 

 { 
     "retained_versions": [ 
         "A valid integer is required." 
     ] 
 } 


 ~~~ 

 "retained_versions" and "rate_limit" both suffer from this problem, and "download_concurrency" and "retry_count" will suffer from it once merged. 

 This might be a Django Rest Framework problem.

Back