Skip to content

Commit

Permalink
cast status code to an int in move/copy celery task
Browse files Browse the repository at this point in the history
 * For some reason the HTTPStatus.CREATED enum was not being converted
   to an integer status code when sending a response back from
   celery.  Perhaps it was being unpickled wrongly?  Dunno, but
   reverting for now to unbreak move/copy tasks.
  • Loading branch information
felliott committed Dec 12, 2017
1 parent bd753ab commit c76a2b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions waterbutler/server/api/v1/provider/movecopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ async def move_or_copy(self):
self.dest_meta = metadata

if created:
self.set_status(HTTPStatus.CREATED)
self.set_status(int(HTTPStatus.CREATED))
else:
self.set_status(HTTPStatus.OK)
self.set_status(int(HTTPStatus.OK))

self.write({'data': metadata.json_api_serialized(self.dest_resource)})

0 comments on commit c76a2b4

Please sign in to comment.