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

Cannot display review when adding reviewer with empty Directory #37

Closed
jherland opened this issue May 16, 2013 · 3 comments
Closed

Cannot display review when adding reviewer with empty Directory #37

jherland opened this issue May 16, 2013 · 3 comments

Comments

@jherland
Copy link

I'm playing with Critic at work, and when I created my first review, I added a colleague specifically to that review (since nobody has configured any filters yet). In the "Add Reviewer" dialog, I entered his user name, and left the Directory blank, and pressed "Add". The review was created and emails sent out, but when I tried to enter the review page, I got the "Darn! It seems we have a problem...", with the following email being sent to admin:

User: jherland
Method: GET
URL: http://lys-critic.cisco.com/r/1

Traceback (most recent call last):
File "/usr/share/critic/critic.py", line 707, in main
for fragment in result:
File "/usr/share/critic/page/showreview.py", line 654, in renderShowReview
row("Reviewers", renderReviewers, "Users responsible for reviewing the changes in this review.", right=False)
File "/usr/share/critic/page/showreview.py", line 358, in row
if callable(value): value(main_row.td('value', id=cellId, colspan=colspan).preformatted())
File "/usr/share/critic/page/showreview.py", line 465, in renderReviewers
filter_id, filter_user = filter_data[(fullname, original_path)]
KeyError: ('Morten Rolland', '/')

-- critic

I ended up logging into the database, and manually resetting the path from "" to "/", and that seems to have fixed the crash. However, I'm guessing the empty string shouldn't have been stored into the db in the first place...

@jensl
Copy link
Owner

jensl commented May 16, 2013

The fix for that was pushed to master yesterday, actually. Was reviewed here: http://critic-review.org/r/86

@jherland
Copy link
Author

Hmm. I saw that fix, and believe I installed it before triggering the bug. Maybe I forgot to restart the server. Anyways, I'm unable to reproduce now, so obviously it is fixed. Sorry for the inconvenience.

BTW, how do you handle upgrading a running server? I've tried to re-run the install script after pulling some new commits, but it refuses (gracelessly) to install over the previous installation. For now, I figure out which files have changed, and then manually copy them one by one into /usr/share/critic, and finally I restart the services (apache and critic-main). This is obviously not very smart or safe...

@jensl
Copy link
Owner

jensl commented May 16, 2013

Upgrading is done by running the upgrade.py script. I guess that might not be written down anywhere. So much isn't. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants