mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 23:43:47 +00:00
Fix bugs introduced while improving performance
This commit is contained in:
parent
acb4dea1b4
commit
ec59487e72
1 changed files with 4 additions and 6 deletions
|
@ -449,15 +449,13 @@ class VersionAction(HistoryEvent):
|
||||||
serialized_data__icontains='"pk": {}'.format(self.object_id())
|
serialized_data__icontains='"pk": {}'.format(self.object_id())
|
||||||
)
|
)
|
||||||
& Q(
|
& Q(
|
||||||
revision__date_created_lt=self.version.revision.date_created
|
revision__date_created__lt=self.version.revision.date_created
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return next(
|
return (Version.objects.get_for_model(model)
|
||||||
Version.objects.get_for_model(model)
|
|
||||||
.filter(query)
|
.filter(query)
|
||||||
.order_by("-revision__date_created")
|
.order_by("-revision__date_created")[0])
|
||||||
)
|
except Exception as e:
|
||||||
except StopIteration:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _compute_diff(self, v1, v2, ignoring=["pwd_ntlm"]):
|
def _compute_diff(self, v1, v2, ignoring=["pwd_ntlm"]):
|
||||||
|
|
Loading…
Reference in a new issue