Closed Bug 882124 Opened 9 years ago Closed 9 years ago

Both 'tags' and 'reason' should be optional when adding a log entry

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

Ryan was trying to set the MOTD on b2g18_v1_1_0 and got an ISE.

Reproducing locally gave:

{
Traceback (most recent call last):
  File "c:\src\treestatus\vendor\lib\python\flask\app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "c:\src\treestatus\vendor\lib\python\repoze\who\middleware.py", line 87, in __call__
    app_iter = app(environ, wrapper.wrap_start_response)
  File "c:\src\treestatus\vendor\lib\python\flask\app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "c:\src\treestatus\vendor\lib\python\flask\app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "c:\src\treestatus\vendor\lib\python\flask\app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "c:\src\treestatus\vendor\lib\python\flask\app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "c:\src\treestatus\vendor\lib\python\flask\app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "c:\src\treestatus\treestatus\app.py", line 656, in update_tree
    status.set_motd(request.environ['REMOTE_USER'], tree, request.form['message'])
  File "c:\src\treestatus\treestatus\app.py", line 272, in set_motd
    self.log(tree, who, 'motd', message)
TypeError: log() takes exactly 6 arguments (5 given)
}

We need to set defaults when logging, given that we can't guarantee that both tags and reason will always be set depending on the action performed.
Attached patch Patch v1Splinter Review
Attachment #761403 - Flags: review?(catlee)
Attachment #761403 - Flags: review?(catlee) → review+
Depends on: 883891
In production :-)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Webtools → Tree Management
Product: Tree Management → Release Engineering
Component: Applications: TreeStatus → General
You need to log in before you can comment on or make changes to this bug.