[PR #12905] [MERGED] 12794 change User ref to get_user_model #14068

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12905
Author: @arthanson
Created: 6/14/2023
Status: Merged
Merged: 6/22/2023
Merged by: @jeremystretch

Base: featureHead: 12794-get-user-model


📝 Commits (4)

  • 66db448 12794 change User ref to get_user_model
  • ea184b6 12794 call get_user_model once in tests
  • cc5f5ac 12794 call get_user_model once in tests
  • a0bfada 12794 use settings.AUTH_USER_MODEL for FK reference

📊 Changes

34 files changed (+117 additions, -69 deletions)

View changed files

📝 netbox/core/forms/filtersets.py (+2 -2)
📝 netbox/core/management/commands/nbshell.py (+2 -2)
📝 netbox/core/models/jobs.py (+2 -2)
📝 netbox/dcim/filtersets.py (+3 -3)
📝 netbox/dcim/forms/bulk_edit.py (+2 -2)
📝 netbox/dcim/forms/filtersets.py (+2 -2)
📝 netbox/dcim/forms/model_forms.py (+2 -2)
📝 netbox/dcim/models/racks.py (+2 -2)
📝 netbox/dcim/tests/test_api.py (+4 -1)
📝 netbox/dcim/tests/test_filtersets.py (+4 -1)
📝 netbox/dcim/tests/test_views.py (+4 -1)
📝 netbox/extras/api/serializers.py (+2 -2)
📝 netbox/extras/filtersets.py (+7 -7)
📝 netbox/extras/forms/filtersets.py (+3 -3)
📝 netbox/extras/management/commands/runscript.py (+3 -1)
📝 netbox/extras/models/change_logging.py (+2 -2)
📝 netbox/extras/models/models.py (+3 -3)
📝 netbox/extras/tests/test_api.py (+4 -1)
📝 netbox/extras/tests/test_filtersets.py (+4 -1)
📝 netbox/extras/tests/test_views.py (+4 -1)

...and 14 more files

📄 Description

Fixes: #12794

Housekeeping - change reference to User model to use get_user_model().


🔄 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/12905 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 6/14/2023 **Status:** ✅ Merged **Merged:** 6/22/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `12794-get-user-model` --- ### 📝 Commits (4) - [`66db448`](https://github.com/netbox-community/netbox/commit/66db448bf8fe93fb28080693f740928afc1f78f6) 12794 change User ref to get_user_model - [`ea184b6`](https://github.com/netbox-community/netbox/commit/ea184b66b6786fe107f5350f2b339dba058d55b6) 12794 call get_user_model once in tests - [`cc5f5ac`](https://github.com/netbox-community/netbox/commit/cc5f5acc0b211f564664ac2173731ca9b7724f65) 12794 call get_user_model once in tests - [`a0bfada`](https://github.com/netbox-community/netbox/commit/a0bfada31f920c53a0387c9159b03ff6c2f9e8de) 12794 use settings.AUTH_USER_MODEL for FK reference ### 📊 Changes **34 files changed** (+117 additions, -69 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/forms/filtersets.py` (+2 -2) 📝 `netbox/core/management/commands/nbshell.py` (+2 -2) 📝 `netbox/core/models/jobs.py` (+2 -2) 📝 `netbox/dcim/filtersets.py` (+3 -3) 📝 `netbox/dcim/forms/bulk_edit.py` (+2 -2) 📝 `netbox/dcim/forms/filtersets.py` (+2 -2) 📝 `netbox/dcim/forms/model_forms.py` (+2 -2) 📝 `netbox/dcim/models/racks.py` (+2 -2) 📝 `netbox/dcim/tests/test_api.py` (+4 -1) 📝 `netbox/dcim/tests/test_filtersets.py` (+4 -1) 📝 `netbox/dcim/tests/test_views.py` (+4 -1) 📝 `netbox/extras/api/serializers.py` (+2 -2) 📝 `netbox/extras/filtersets.py` (+7 -7) 📝 `netbox/extras/forms/filtersets.py` (+3 -3) 📝 `netbox/extras/management/commands/runscript.py` (+3 -1) 📝 `netbox/extras/models/change_logging.py` (+2 -2) 📝 `netbox/extras/models/models.py` (+3 -3) 📝 `netbox/extras/tests/test_api.py` (+4 -1) 📝 `netbox/extras/tests/test_filtersets.py` (+4 -1) 📝 `netbox/extras/tests/test_views.py` (+4 -1) _...and 14 more files_ </details> ### 📄 Description ### Fixes: #12794 Housekeeping - change reference to User model to use get_user_model(). --- <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 23:22:20 +01:00
adam closed this issue 2025-12-29 23:22:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14068