Project

Profile

Help

Issue #3436

closed

Creating duplicate content results in 500 IntegrityError

Added by daviddavis about 6 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 46
Quarter:

Description

$ http POST http://localhost:8000/api/v3/content/file/ relative_path=hello.tar.gz artifact="http://localhost:8000/api/v3/artifacts/79993432-e329-4bef-86bb-9bd481cee489/"   [392/1963]
HTTP/1.0 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Length: 226
Content-Type: application/json
Date: Tue, 06 Mar 2018 19:33:49 GMT
Server: WSGIServer/0.2 CPython/3.5.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "_href": "http://localhost:8000/api/v3/content/file/db0dc6fe-d0c0-445c-af08-cd38aa9f4c42/",
    "artifact": "http://localhost:8000/api/v3/artifacts/79993432-e329-4bef-86bb-9bd481cee489/",
    "relative_path": "hello.tar.gz",
    "type": "file"
}

$ http POST http://localhost:8000/api/v3/content/file/ relative_path=hello.tar.gz artifact="http://localhost:8000/api/v3/artifacts/79993432-e329-4bef-86bb-9bd481cee489/"
HTTP/1.0 500 Internal Server Error
Content-Length: 23305
Content-Type: text/plain
Date: Tue, 06 Mar 2018 19:33:53 GMT
Server: WSGIServer/0.2 CPython/3.5.4
Vary: Cookie
X-Frame-Options: SAMEORIGIN

IntegrityError at /api/v3/content/file/
UNIQUE constraint failed: pulp_file_filecontent.relative_path, pulp_file_filecontent.digest

Related issues

Related to Pulp - Test #4125: Test if creating duplicate content results in 400 CLOSED - COMPLETEkersomActions

Also available in: Atom PDF