-
Notifications
You must be signed in to change notification settings - Fork 71
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 Folder.DoesNotExist error in local deployment #3580
Fix Folder.DoesNotExist error in local deployment #3580
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3580 +/- ##
===========================================
+ Coverage 68.99% 69.03% +0.03%
===========================================
Files 48 48
Lines 6969 6978 +9
===========================================
+ Hits 4808 4817 +9
Misses 2161 2161 ☔ View full report in Codecov by Sentry. |
Hmmmmm. Yes, I think that does suggest a deeper issue. Nice catch!! All folders need to have Here's what I'm going to bet is going on:
These old JSON fixtures are a total pain in the butt, and we've migrated... maybe half?... of the suite from using them. I can't wait until we are done with that project and can lose them. In the meantime, I think probably the quickest fix is to run I think we don't want to tweak the code so this isn't an error; if a production folder finds itself in this state, I think it ought to be noisy about it... though, now that we have migrated the production data to use this new field, we might be able to improve the way in which it is noisy about it (e.g., make the field non-nullable). |
Thanks @rebeccacremona! I had a hunch it might be something along those lines. I agree about fixing the root issue in |
This reverts commit 0782864.
@cmsetzer wonderful, thanks! if it isn't working for any reason... we can figure out how to update the json files so that they just have all the correct field values. i initially thought that would be too annoying, but could be that was the wrong call 🙂 |
I took a swing at using This takes care of the local issue on my end and tests are passing. Want to take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ughh, sorry for that hassle!! Thanks for doing this 🙏!
#3563 may have introduced a regression affecting a locally deployed vanilla Perma setup (as far as I can tell, this does not affect prod). After re-deploying Perma from scratch with all Docker images, volumes, and caches cleared, the following error occurs when you submit any URL for capture:
If we change the
get(pk=folder.tree_root_id)
to afilter(id=folder.tree_root_id).first()
, the query just retrieves 0 rows and then moves on without throwing an exception.Any concerns with this solution? Or does this suggest a deeper issue?