Commit 325cdd9
committed
User get_user_model() rather than importing User directly
This is the recommended way to reference the user model according to
the documentation[1]. It should be supported by at least Django 4, so
can be assumed to work for NetBox releases older than 4.0 as well. I
have only tested it with 4.0(.1) though.
[1] https://docs.djangoproject.com/en/5.0/topics/auth/customizing/#referencing-the-user-model1 parent b1f4673 commit 325cdd9
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments