-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
v3.0.2
Python version
3.9
Steps to Reproduce
- Create e.g. a Device
- Edit the Device, save it as fast as possible (Edit -> directly to Save)
- Inspect error messages, that tell you, you should choose a Site, Device-Type and Device-Role
The time required to "wait" before saving anything is depending on the time lazy fields require to load their data.
So more data causes more time margin for this error to cause issues and increases its real life applicance.
Expected Behavior
A save without any changes should not omit data of the current instance of the model.
Observed Behavior
The POST is done before lazy loading is finished and seems to send null-values for the unfinished fields.
On NetBox instances with a lot of e.g. Sites, VLANs or else - anything that is loaded dynamically/loaded lazy, this issue becomes more and more apparent.
As you can see in the screenshot attached, the lazy loading of my local dev env (with nearly no data in it) took long enough to reproduce this error:
Note: I have a simple CustomValidator with tenant required, therefore is Tenant also noted as required in screenshot.
