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

fix: import_files command to skip existing files #1420

Closed
wants to merge 1 commit into from

Conversation

misli
Copy link

@misli misli commented Sep 10, 2023

  • Fix use of get_or_create to really skip existing files

Description

The import_files command tries to skip existing files, but it always create new one,
because the way it detects the existing one is wrong.

Related resources

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

@codecov
Copy link

codecov bot commented Sep 10, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (dbeda3a) 75.22% compared to head (cba2715) 75.09%.
Report is 16 commits behind head on master.

Files Patch % Lines
filer/management/commands/import_files.py 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1420      +/-   ##
==========================================
- Coverage   75.22%   75.09%   -0.14%     
==========================================
  Files          75       75              
  Lines        3455     3461       +6     
  Branches      555      555              
==========================================
  Hits         2599     2599              
- Misses        691      697       +6     
  Partials      165      165              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fsbraun
Copy link
Member

fsbraun commented Sep 13, 2023

Hi @misli ! Thank you for the pull request.

Can you elaborate on the issue? Why are existing files detected wrongly?

From the code I see, you allow to have multiple files with the same name in the same folder but then ignore all of them but the first. To me it is not immediately transparent why this should be the right way to go. But then again, I have not fully understood the issue.

Copy link

stale bot commented Dec 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 12, 2023
Copy link

stale bot commented Jan 9, 2024

This will now be closed due to inactivity, but feel free to reopen it.

@stale stale bot closed this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants