rack_reservation does not set correct user #4953

Closed
opened 2025-12-29 19:22:36 +01:00 by adam · 0 comments
Owner

Originally created by @FalcoSuessgott on GitHub (Jun 1, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.1

Python version

3.9

Steps to Reproduce

curl -X POST "http://localhost:8000/api/dcim/rack-reservations/" -H "accept: application/json" -H "Authorization: Token 0123456789abcdef0123456789abcdef01234567" -H "Content-Type: application/json" -H "X-CSRFToken: PyMWmxAR5J2DM31IJ1dhdUvv3p5xlEDhh5Qh2XUqJkBA5PgkjZAwCqDEUheK6b17" -d "{  "rack": 7,  "units": [5,6],  "user": 8,  "description": "string"}"

results in:

{
  "id": 8,
  "url": "http://localhost:8000/api/dcim/rack-reservations/8/",
  "display": "Reservation for rack racks_1",
  "rack": {
    "id": 7,
    "url": "http://localhost:8000/api/dcim/racks/7/",
    "display": "racks_1",
    "name": "racks_1",
    "display_name": "racks_1"
  },
  "units": [
    5,
    6
  ],
  "created": "2021-06-01",
  "user": {
    "id": 1,
    "url": "http://localhost:8000/api/users/users/1/",
    "display": "admin",
    "username": "admin"
  },
  "tenant": null,
  "description": "string",
  "tags": [],
  "custom_fields": {}
}

Expected Behavior

I expect the rack reservation to be mapped to user with the id 8.

Observed Behavior

Instead of the rack_reservation is mapped to the admin account (id=1).

Originally created by @FalcoSuessgott on GitHub (Jun 1, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.1 ### Python version 3.9 ### Steps to Reproduce ```sh curl -X POST "http://localhost:8000/api/dcim/rack-reservations/" -H "accept: application/json" -H "Authorization: Token 0123456789abcdef0123456789abcdef01234567" -H "Content-Type: application/json" -H "X-CSRFToken: PyMWmxAR5J2DM31IJ1dhdUvv3p5xlEDhh5Qh2XUqJkBA5PgkjZAwCqDEUheK6b17" -d "{ "rack": 7, "units": [5,6], "user": 8, "description": "string"}" ``` results in: ```json { "id": 8, "url": "http://localhost:8000/api/dcim/rack-reservations/8/", "display": "Reservation for rack racks_1", "rack": { "id": 7, "url": "http://localhost:8000/api/dcim/racks/7/", "display": "racks_1", "name": "racks_1", "display_name": "racks_1" }, "units": [ 5, 6 ], "created": "2021-06-01", "user": { "id": 1, "url": "http://localhost:8000/api/users/users/1/", "display": "admin", "username": "admin" }, "tenant": null, "description": "string", "tags": [], "custom_fields": {} } ``` ### Expected Behavior I expect the rack reservation to be mapped to user with the id `8`. ### Observed Behavior Instead of the rack_reservation is mapped to the admin account (id=`1`).
adam added the type: bugstatus: accepted labels 2025-12-29 19:22:36 +01:00
adam closed this issue 2025-12-29 19:22:36 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4953