Modify

Opened 3 months ago

Closed 3 months ago

#13556 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'status'

Reported by: anonymous Owned by: lucid
Priority: normal Component: PullRequestsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

While doing a POST operation on /ticket/4085, Trac issued an internal error.

Posting a comment containing "reviewed PR:2296" and "reviewed PR:2297". But PR:2297 was only just created while writing that comment and was shown as a green "new / conflicting" comment.

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 664, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 249, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\trac\ticket\web_ui.py", line 182, in process_request
    return self._process_ticket_request(req)
  File "build\bdist.win32\egg\trac\ticket\web_ui.py", line 682, in _process_ticket_request
    valid &= self._validate_ticket(req, ticket, not valid)
  File "build\bdist.win32\egg\trac\ticket\web_ui.py", line 1332, in _validate_ticket
    for field, message in manipulator.validate_ticket(req, ticket):
  File "build\bdist.win32\egg\pullrequests\web_ui.py", line 163, in validate_ticket
    req.args['comment'] = self._handle_comment(req, ticket, comment, author)
  File "build\bdist.win32\egg\pullrequests\web_ui.py", line 191, in _handle_comment
    pr.status = command
AttributeError: 'NoneType' object has no attribute 'status'

Attachments (0)

Change History (2)

comment:1 Changed 3 months ago by anonymous

Actually it was probably just a typo in the PR number "2297" should have been "2287".

Still might be nice to show a better error message for non-existing PR numbers.

comment:2 Changed 3 months ago by lucid

Resolution: fixed
Status: newclosed

In 17366:

PullRequestsPlugin: Show warning if PR not found.
(fix #13556)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain lucid.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.