From 076651d8b8195014327f500d9119a9aca64b2795 Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Tue, 11 Oct 2016 13:00:19 -0400 Subject: [PATCH] add location to attributes exported to neo4j --- .../djangoapps/coursegraph/management/commands/dump_to_neo4j.py | 1 + .../coursegraph/management/commands/tests/test_dump_to_neo4j.py | 1 + 2 files changed, 2 insertions(+) diff --git a/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py b/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py index 65d9fe30a5..1471db7c85 100644 --- a/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py +++ b/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py @@ -82,6 +82,7 @@ class ModuleStoreSerializer(object): fields['course'] = course_key.course fields['run'] = course_key.run fields['course_key'] = six.text_type(course_key) + fields['location'] = six.text_type(item.location) label = item.scope_ids.block_type diff --git a/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py b/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py index 275e54cd1d..1f4b9c1281 100644 --- a/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py +++ b/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py @@ -118,6 +118,7 @@ class TestModuleStoreSerializer(TestDumpToNeo4jCommandBase): self.assertIn("course", fields.keys()) self.assertIn("run", fields.keys()) self.assertIn("course_key", fields.keys()) + self.assertIn("location", fields.keys()) self.assertNotIn("checklist", fields.keys()) def test_serialize_course(self):