Cannot generate token from site view #1114

Closed
opened 2025-12-29 16:29:07 +01:00 by adam · 3 comments
Owner

Originally created by @Atoms on GitHub (Jul 19, 2017).

Python version: 3.4
NetBox version: 2.1.0

User cannot generate token for himself in site view, from admin panel token generation happens.
Also user who has all permissions cannot generate token in site.

enabled debug mode, got error:
image

Originally created by @Atoms on GitHub (Jul 19, 2017). **Python version:** 3.4 **NetBox version:** 2.1.0 User cannot generate token for himself in site view, from admin panel token generation happens. Also user who has all permissions cannot generate token in site. enabled debug mode, got error: ![image](https://user-images.githubusercontent.com/9615/28365858-dd67420e-6c92-11e7-95f5-4e78c39df7f7.png)
adam added the type: bug label 2025-12-29 16:29:07 +01:00
adam closed this issue 2025-12-29 16:29:08 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 19, 2017):

Can you provide the full stack trace please?

@jeremystretch commented on GitHub (Jul 19, 2017): Can you provide the full stack trace please?
Author
Owner

@Atoms commented on GitHub (Jul 19, 2017):

Seems i found a problem, problem is if you want to put in token it requires predefined length, but when you put in not required length it throws this error, if i want to make own token ir should be written somewhere required length and maybe even counted when you input token, and proper error should be provided when length is not correct.

@Atoms commented on GitHub (Jul 19, 2017): Seems i found a problem, problem is if you want to put in token it requires predefined length, but when you put in not required length it throws this error, if i want to make own token ir should be written somewhere required length and maybe even counted when you input token, and proper error should be provided when length is not correct.
Author
Owner

@jeremystretch commented on GitHub (Jul 19, 2017):

Probably need to add a minimum length validator to the form field.

@jeremystretch commented on GitHub (Jul 19, 2017): Probably need to add a minimum length validator to the form field.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1114