Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

models: Enforce an ordering to on audit logs to solve a flaky test.

Alex Vandiver872e2ad2cd52
diff --git a/zerver/models/realm_audit_logs.py b/zerver/models/realm_audit_logs.py
index 32c010cee2d..11464c2e5e9 100644
--- a/zerver/models/realm_audit_logs.py
+++ b/zerver/models/realm_audit_logs.py
@@ -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",