-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutoSyncRecord inconsistent after file change #14952
Comments
Please revise your post above to include explicit instructions. It's not clear exactly which actions are needed to reproduce the bug. Providing a concrete example would be very helpful. |
@jeremystretch I've updated the instructions to reproduce the issue. |
I believe this could be solved easily by altering the delete mechanism in |
Thanks @alehaa. I think you're on the right track here. We can probably just change |
Deployment Type
Self-hosted
NetBox Version
v3.7.1
Python Version
3.11
Steps to Reproduce
Create data source
TestData
:yes
Sync data source
TestData
.Create export template
TestExport
:Circuits > Circuit
(but any will do)yes
Edit export template
TestExport
.Select Data file
tutorial/step01-initial-setup.md
and save. (will fail).Go back to edit form for export template
TestExport
.Set Data source, Data file and Auto Sync enabled to null and save.
Expected Behavior
Step 5: Edit succeeds.
Step 7:
AutoSyncRecord
is removed from database.Observed Behavior
Step 5: An
IntegrityError
error is raised, asSyncedDataMixin
'ssave()
method won't change existingAutoSyncRecord
objects.Step 7: Edit succeeds, but the related
AutoSyncRecord
stays in the database. This is dueSyncedDataMixin
'ssave()
method will remove relatedAutoSyncRecord
objects, but theQuerySet
filter uses fields of the object previously set toNone
in the edit form.The text was updated successfully, but these errors were encountered: