Skip to content

Commit

Permalink
Added schema_id field to graphs api results.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabmunrio committed Dec 4, 2015
1 parent 6fbaa4a commit 5c39a5c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sylva/graphs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def patch(self, request, graph_slug, format=None):
post_data['name'] = request.data.get('name', None)

post_data['owner'] = graph.owner.pk
post_data['schema'] = graph.schema_id

if post_data['name'] is None:
post_data['name'] = graph.name
Expand All @@ -98,6 +99,7 @@ def put(self, request, graph_slug, format=None):
post_data['name'] = request.data.get('name', None)

post_data['owner'] = graph.owner.pk
post_data['schema'] = graph.schema_id

if post_data['name'] is None:
post_data['name'] = graph.name
Expand Down
1 change: 1 addition & 0 deletions sylva/graphs/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ class Meta:
'public',
'order',
'last_modified',
'schema',
'owner')
2 changes: 1 addition & 1 deletion sylva/sylva/tests/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -2763,5 +2763,5 @@ def test_query_builder_f_fields_equals_and_aggregate(self):
lookup_input_value = self.browser.find_by_xpath(
"//input[@class='lookup-value']")[0].value
spin_assert(lambda: self.assertEqual(lookup_input_value,
u"Count(Bob type 1.Name1)"))
u"count(Bob type 1.Name1)"))
Graph.objects.get(name="Bob's graph").destroy()

0 comments on commit 5c39a5c

Please sign in to comment.