Skip to content

Commit

Permalink
Merge pull request #25 from baseplate-admin/patch-2
Browse files Browse the repository at this point in the history
Use `next` instead of `__next__`
  • Loading branch information
mariocesar authored Dec 19, 2024
2 parents c5241ab + 4b34578 commit 7a33391
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion django_ltree/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ def create_child(self, parent=None, **kwargs):
skip=paths_in_use.values_list("path", flat=True),
label_size=getattr(self.model, "label_size"),
)
kwargs["path"] = path_generator.next()
kwargs["path"] = next(path_generator)
return self.create(**kwargs)
2 changes: 0 additions & 2 deletions django_ltree/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ def __next__(self):
path = PathValue(self.path_prefix + [label])
if path not in self.skip_paths:
return path

next = __next__

0 comments on commit 7a33391

Please sign in to comment.