chore: removed project filter (#2284)

This commit is contained in:
Bavisetti Narayan 2023-09-27 19:16:22 +05:30 committed by GitHub
parent 7404fe71b1
commit 9dd22f07f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ class GlobalView(BaseModel):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
if self._state.adding: if self._state.adding:
largest_sort_order = GlobalView.objects.filter( largest_sort_order = GlobalView.objects.filter(
project=self.project workspace=self.workspace
).aggregate(largest=models.Max("sort_order"))["largest"] ).aggregate(largest=models.Max("sort_order"))["largest"]
if largest_sort_order is not None: if largest_sort_order is not None:
self.sort_order = largest_sort_order + 10000 self.sort_order = largest_sort_order + 10000