mirror of
https://github.com/zulip/zulip.git
synced 2026-06-30 21:11:04 +08:00
models: Enforce an ordering to on audit logs to solve a flaky test.
Multiple events may be created with the same timestamp; we add a default ordering by "id" such that these have a consistent ordering in tests (to solve for flaky tests), as well as in the internal API.
This commit is contained in:
parent
9bc1eb4bb9
commit
872e2ad2cd
@ -226,6 +226,7 @@ class RealmAuditLog(AbstractRealmAuditLog):
|
||||
event_last_message_id = models.IntegerField(null=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ["id"]
|
||||
indexes = [
|
||||
models.Index(
|
||||
name="zerver_realmauditlog_realm__event_type__event_time",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user