Skip to content

Commit a467fcf

Browse files
committed
Resolve warning of inconsistent result when call LabResults view
As LabResults is used in a test with pagination, a default ordering is required to omit warning about unpredictable order.
1 parent cb023fc commit a467fcf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

example/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ class LabResults(models.Model):
169169
related_name="lab_results",
170170
)
171171

172+
class Meta:
173+
ordering = ("id",)
174+
172175

173176
class Company(models.Model):
174177
name = models.CharField(max_length=100)

0 commit comments

Comments
 (0)