Skip to content

Commit

Permalink
Add explicit pagination to change requests
Browse files Browse the repository at this point in the history
  • Loading branch information
zachaysan committed Dec 16, 2024
1 parent 0223227 commit 0e2dedd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/features/workflows/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ class ChangeRequest(

ignore_conflicts = models.BooleanField(default=False)

class Meta:
# Explicit ordering to prevent pagination warnings.
ordering = ("id",)

def approve(self, user: "FFAdminUser"):
if user.id == self.user_id:
raise CannotApproveOwnChangeRequest(
Expand Down

0 comments on commit 0e2dedd

Please sign in to comment.