8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-24 12:23:11 +00:00

Fix bugs introduced while improving performance

This commit is contained in:
Jean-Romain Garnier 2020-04-24 18:15:34 +00:00 committed by Supelec Rezo Rennes
parent 0892d5495d
commit f3d261b608

View file

@ -449,15 +449,13 @@ class VersionAction(HistoryEvent):
serialized_data__icontains='"pk": {}'.format(self.object_id())
)
& Q(
revision__date_created_lt=self.version.revision.date_created
revision__date_created__lt=self.version.revision.date_created
)
)
return next(
Version.objects.get_for_model(model)
return (Version.objects.get_for_model(model)
.filter(query)
.order_by("-revision__date_created")
)
except StopIteration:
.order_by("-revision__date_created")[0])
except Exception as e:
return None
def _compute_diff(self, v1, v2, ignoring=["pwd_ntlm"]):