Menu

#61 2.6 - def upload_stats error

v2
closed
nobody
5
2015-03-19
2012-07-05
No

When uploading a file a cherrypy error is generated on this line in FileController.py

if key.split(":")[0] == cherrypy.session.get('user').id: # This will actually get uploads by the user and uploads using a ticket they generated

It might be because of the single quotes around user. However two lines earlier you already get the current session user and assign it to userId, so I've changed mine to if key.split(":")[0] == userId

Discussion

  • David Hutchins

    David Hutchins - 2015-03-19

    I was not able to reproduce the error. But I have to agree that using the local variable is more efficient and probably a better practice in this case.

     
  • David Hutchins

    David Hutchins - 2015-03-19
    • status: open --> closed
    • Group: --> v2
     

Log in to post a comment.

MongoDB Logo MongoDB