[PR #1981] [MERGED] compare strings using "==" not "is", fix crash bug #12291

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/1981
Author: @luto
Created: 3/21/2018
Status: Merged
Merged: 3/21/2018
Merged by: @jeremystretch

Base: developHead: patch-1


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 netbox/extras/models.py (+1 -1)

📄 Description

fixes #1980

To my knowledge strings should be compared using == not is, but I can't find a proper source on that. At least this explains the weird behavior described in the fixed bug.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/1981 **Author:** [@luto](https://github.com/luto) **Created:** 3/21/2018 **Status:** ✅ Merged **Merged:** 3/21/2018 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`0b825ac`](https://github.com/netbox-community/netbox/commit/0b825ac3d0f0ec31b0e7e7fbd9612ae192c07d47) compare strings using "==" not "is", fixes #1980 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/models.py` (+1 -1) </details> ### 📄 Description fixes #1980 To my knowledge strings should be compared using `==` not `is`, but I can't find a proper source on that. At least this explains the weird behavior described in the fixed bug. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:20:42 +01:00
adam closed this issue 2025-12-29 22:20:42 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12291