Skip to content

Commit fffff16

Browse files
Merge pull request #43 from dmitrymishanov/small_fix_for_resource_list_post
small_fix_for_resource_list_post
2 parents 176edb0 + 5802a83 commit fffff16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_combo_jsonapi/resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def post(self, *args, **kwargs):
185185
else:
186186
result = schema.dump(obj)
187187

188-
if result["data"].get("links", {}).get("self"):
188+
if (result["data"] or {}).get("links", {}).get("self"):
189189
final_result = (result, 201, {"Location": result["data"]["links"]["self"]})
190190
else:
191191
final_result = (result, 201)

0 commit comments

Comments
 (0)