diff --git a/api/features/workflows/core/migrations/0012_alter_changerequest_options.py b/api/features/workflows/core/migrations/0012_alter_changerequest_options.py new file mode 100644 index 000000000000..4c9d85388ebe --- /dev/null +++ b/api/features/workflows/core/migrations/0012_alter_changerequest_options.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.17 on 2024-12-16 16:49 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("workflows_core", "0011_add_project_to_change_requests"), + ] + + operations = [ + migrations.AlterModelOptions( + name="changerequest", + options={"ordering": ("id",)}, + ), + ] diff --git a/api/features/workflows/core/models.py b/api/features/workflows/core/models.py index f5c5da2f9d00..b25395a67f57 100644 --- a/api/features/workflows/core/models.py +++ b/api/features/workflows/core/models.py @@ -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(