Skip to content

Commit

Permalink
Merge branch 'develop': v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mahenzon committed Dec 22, 2020
2 parents df470ea + 4b7802a commit 3a597c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
# built documents.
#
# The short X.Y version.
version = "0.1"
version = "1.0"
# The full version, including alpha/beta/rc tags.
release = "0.1"
release = "1.0.4"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Binary file modified docs/img/schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion flask_combo_jsonapi/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def post(self, *args, **kwargs):

obj = self.create_object(data, kwargs)

result = schema.dump(obj)
if obj is None:
result = {"data": None}
else:
result = schema.dump(obj)

if result["data"].get("links", {}).get("self"):
final_result = (result, 201, {"Location": result["data"]["links"]["self"]})
Expand Down
2 changes: 1 addition & 1 deletion flask_combo_jsonapi/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_related_schema(schema, field):
:param field: the relationship field
:return Schema: the related schema
"""
return schema._declared_fields[field].__dict__['_Relationship__schema']
return schema._declared_fields[field].schema


def get_schema_from_type(resource_type):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from setuptools import setup, find_packages

__version__ = "1.0.3"
__version__ = "1.0.4"


requirements_filepath = os.path.join(os.path.dirname(__name__), "requirements.txt")
Expand Down

0 comments on commit 3a597c8

Please sign in to comment.