-
Notifications
You must be signed in to change notification settings - Fork 274
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
Internal Server Error with History #1324
Comments
Is it link to this? I don't understand the answer really... |
Thanks for the investigation. I don't understand the history code in details, sorry... Potentially, we manipulate old version of objects, and I don't know how it interacts with schema changes and migrations. If I had to guess, I see two possibilities:
I checked who wrote that code, and it's you 😄 #1223 But the complexity comes from previous code, of course. |
I spent a couple of hours to investigate further but I didn't find anything convincing. |
I'm closing this as we have a workaround for it now. Please reopen if you have another error. |
On my production server, history works well for new small projects. But for old projects I get "Internal Server Error" when I go on the history page.
I didn't succeed in reproducing the bug on a small example in a dev environment.
After some investigations, I realized that
detailed_version.payer
anddetailed_version.owers
returns None here:ihatemoney/ihatemoney/history.py
Lines 96 to 101 in 710aee9
So if I replace
describe_version(detailed_version.payer))
bystr(Person.query.get(detailed_version.payer_id, project))
it works for the payer. I don't know how to do the same trick for owers.Any idea why the
payer
method returns None here?Any idea why the object
detailed_version
does not haveowers
attribute?Is it linked to the fact that this relationship is manually defined?
ihatemoney/ihatemoney/models.py
Lines 644 to 649 in 710aee9
The text was updated successfully, but these errors were encountered: