Skip to content

Commit

Permalink
Correct temporal siblings
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Nov 1, 2012
1 parent bfdf336 commit 9f6b992
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/zumanji/models.py
Expand Up @@ -169,7 +169,7 @@ def _get_temporal_sibling(self, tag=None, previous=False):
if tag:
filter_args["tags"] = tag

qs = type(self).objects
qs = type(self).objects.filter(**filter_args)

if self.revision.datetime:
if previous:
Expand All @@ -185,12 +185,12 @@ def _get_temporal_sibling(self, tag=None, previous=False):
qs = qs.filter(
datetime__gt=self.datetime,
)
order_field = ('-datetime')
order_field = ('-datetime',)
else:
qs = qs.filter(
datetime__lt=self.datetime,
)
order_field = ('datetime')
order_field = ('datetime',)

try:
return qs.exclude(
Expand Down

0 comments on commit 9f6b992

Please sign in to comment.