Skip to content

Commit

Permalink
Switch creates to empty response if no instance
Browse files Browse the repository at this point in the history
  • Loading branch information
stevelacey committed Jul 13, 2022
1 parent c8cbd68 commit 99dc420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worf/views/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ def new_instance(self):

def post(self, *args, **kwargs):
instance = self.create(*args, **kwargs)
result = self.load_serializer().dump(instance)
result = self.load_serializer().dump(instance) if instance else ""
return self.render_to_response(result, 201)

0 comments on commit 99dc420

Please sign in to comment.