Difference in case sensitivity in API vs WebUI for creating new objects #2367

Closed
opened 2025-12-29 17:25:20 +01:00 by adam · 3 comments
Owner

Originally created by @bdlamprecht on GitHub (Feb 12, 2019).

Environment

  • Python version: 3.6.7
  • NetBox version: 2.5.5

Steps to Reproduce

  1. Create an object in the WebUI with the name being in all uppercase (same role, site, etc).
  2. Attempt to create the same object using the API but with the name being in all lowercase.
  3. This fails with the error returned as follows:
{"name":["device with this name already exists."]}
  1. When attempting to create the same device using in all lowercase via the WebUI, it is created just fine.

Expected Behavior

Be consistent between the API and the WebUI interfaces for device creation.

Observed Behavior

Different results (case insensitive in the WebUI vs case sensitive in the API)

Originally created by @bdlamprecht on GitHub (Feb 12, 2019). ### Environment * Python version: 3.6.7 * NetBox version: 2.5.5 ### Steps to Reproduce 1. Create an object in the WebUI with the name being in all uppercase (same `role`, `site`, etc). 2. Attempt to create the same object using the API but with the name being in all lowercase. 3. This fails with the error returned as follows: ``` {"name":["device with this name already exists."]} ``` 4. When attempting to create the same device using in all lowercase via the WebUI, it is created just fine. <!-- What did you expect to happen? --> ### Expected Behavior Be consistent between the API and the WebUI interfaces for device creation. <!-- What happened instead? --> ### Observed Behavior Different results (case **in**sensitive in the WebUI vs case sensitive in the API)
adam added the status: revisions needed label 2025-12-29 17:25:20 +01:00
adam closed this issue 2025-12-29 17:25:20 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 13, 2019):

I'm not able to reproduce this: I can create devices named "TEST" and "test" without issues. Please post the exact steps you're taking for both the web UI and the API.

Are you sure you're not running into an issue with duplicate slugs?

@jeremystretch commented on GitHub (Feb 13, 2019): I'm not able to reproduce this: I can create devices named "TEST" and "test" without issues. Please post the *exact* steps you're taking for both the web UI and the API. Are you sure you're not running into an issue with duplicate slugs?
Author
Owner

@bdlamprecht commented on GitHub (Feb 13, 2019):

It could be duplicate values for the slug, I'll have to look into that again.

Also, I discovered the error using pynetbox, I'll double check that as well and update this issue by using just curl queries against the API.

@bdlamprecht commented on GitHub (Feb 13, 2019): It _**could**_ be duplicate values for the `slug`, I'll have to look into that again. Also, I discovered the error using `pynetbox`, I'll double check that as well and update this issue by using just `curl` queries against the API.
Author
Owner

@bdlamprecht commented on GitHub (Feb 14, 2019):

Well, I just spun up a new instance of v2.5.6 and I can't seem to get the error to happen again.

I'm not sure exactly where this came up, but I'll close this issue as unable to reproduce.
If I find the same scenario pop up again, I'll re-open this and document the exact steps that caused the error to occur before I move-on and forget.

My apologies for adding to your high number of newly opened issues. 😬
I would much rather have the time spent being to implement new features. 💯

@bdlamprecht commented on GitHub (Feb 14, 2019): Well, I just spun up a new instance of `v2.5.6` and I can't seem to get the error to happen again. I'm not sure exactly where this came up, but I'll close this issue as unable to reproduce. If I find the same scenario pop up again, I'll re-open this and document the _**exact**_ steps that caused the error to occur before I move-on and forget. My apologies for adding to your high number of newly opened issues. :grimacing: I would much rather have the time spent being to implement new features. :100:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2367