Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respond with empty hash when association is null
Browse files Browse the repository at this point in the history
Due to null response python json parsing seems to be broken
subbarao committed Jul 29, 2016
1 parent c4110bc commit 99c8ebe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ def initialize(parent_serializer, serializer, serializable_resource_options, arg

def as_json
hash = {}
hash[:data] = data if association_options[:include_data]
hash[:data] = data || {} if association_options[:include_data]
links = self.links
hash[:links] = links if links.any?
meta = self.meta

0 comments on commit 99c8ebe

Please sign in to comment.