Skip to content

Commit a733196

Browse files
Added missing arguments
1 parent 6c8ce2d commit a733196

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

django_postgresql_dag/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,19 +313,19 @@ def path_ids_list(
313313
raise NodeNotReachableException
314314
return path
315315

316-
def shortest_path(self, target_node, directional=True):
316+
def shortest_path(self, target_node, directional=True, max_depth=20):
317317
"""
318318
Returns a queryset of the shortest path
319319
"""
320320
return self.filter_order_ids(
321-
self.path_ids_list(target_node, directional=directional)[0]
321+
self.path_ids_list(target_node, directional=directional, max_depth=max_depth)[0]
322322
)
323323

324-
def distance(self, target_node, directional=True):
324+
def distance(self, target_node, directional=True, max_depth=20):
325325
"""
326326
Returns the shortest hops count to the target node
327327
"""
328-
return len(self.path_ids_list(target_node, directional=directional)[0]) - 1
328+
return len(self.path_ids_list(target_node, directional=directional, max_depth=max_depth)[0]) - 1
329329

330330
def is_root(self):
331331
"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from setuptools import setup
55

6-
version = '0.0.7'
6+
version = '0.0.8'
77

88
classifiers = [
99
"Development Status :: 3 - Alpha",

0 commit comments

Comments
 (0)