Skip to content
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

Updated files are not updated when syncing a DataSource #11659

Closed
kkthxbye-code opened this issue Feb 3, 2023 · 1 comment
Closed

Updated files are not updated when syncing a DataSource #11659

kkthxbye-code opened this issue Feb 3, 2023 · 1 comment
Assignees
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@kkthxbye-code
Copy link
Contributor

NetBox version

v3.5.0-dev

Python version

3.10

Steps to Reproduce

  1. Create a DataSouce pointing to a local directory
  2. Create a file in the local directory
  3. Sync the DataSource
  4. Change the contents of the file in the local directory
  5. Sync the DataSource again

Expected Behavior

The contents of the file should be updated.

Observed Behavior

The file is not updated, only the file hash is.

I believe this:

updated_count = DataFile.objects.bulk_update(updated_files, ['hash'])

Should be changed to this:

updated_count = DataFile.objects.bulk_update(updated_files, ['hash', 'last_updated', 'size', 'data'])

@kkthxbye-code kkthxbye-code added the type: bug A confirmed report of unexpected behavior in the application label Feb 3, 2023
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Feb 3, 2023
@jeremystretch jeremystretch self-assigned this Feb 3, 2023
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Feb 3, 2023
@jeremystretch
Copy link
Member

Whoops, yeah. I had stripped those out at some point during testing. Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants