Project

Profile

Help

Issue #8899

closed

IntegerFields cannot be set null after being set to a value even if allow_null=True

Added by dalley almost 3 years ago. Updated almost 3 years ago.

Status:
CLOSED - NOTABUG
Priority:
High
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

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.


Related issues

Blocks Pulp - Story #8881: As a user, Pulp will retry downloads by default 3 times and I can configure this value on my RemoteCLOSED - CURRENTRELEASEdalley

Actions

Also available in: Atom PDF