Skip to content

Commit 92bfd4a

Browse files
debug topological sort
1 parent 24c090d commit 92bfd4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

datajoint/schemas.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ def save(self, python_filename=None):
412412
413413
:return: a string containing the body of a complete Python module defining this schema.
414414
"""
415+
self.connection.dependencies.load()
415416
self._assert_exists()
416417
module_count = itertools.count()
417418
# add virtual modules for referenced modules with names vmod0, vmod1, ...
@@ -477,11 +478,12 @@ def list_tables(self):
477478
478479
:return: A list of table names from the database schema.
479480
"""
481+
self.connection.dependencies.load()
480482
return [
481483
t
482484
for d, t in (
483485
full_t.replace("`", "").split(".")
484-
for full_t in Diagram(self).topo_sort()
486+
for full_t in self.connection.dependencies.topo_sort()
485487
)
486488
if d == self.database
487489
]
@@ -530,7 +532,6 @@ def __init__(
530532

531533
def list_schemas(connection=None):
532534
"""
533-
534535
:param connection: a dj.Connection object
535536
:return: list of all accessible schemas on the server
536537
"""

0 commit comments

Comments
 (0)