Skip to content

Commit

Permalink
Add project to filter
Browse files Browse the repository at this point in the history
  • Loading branch information
zachaysan committed Jan 30, 2025
1 parent cf12c63 commit de08e32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/environments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def get_queryset(self):

def perform_create(self, serializer):
existing_environment = Environment.objects.filter(
name=serializer.validated_data["name"]
name=serializer.validated_data["name"],
project=serializer.validated_data["project"],
)
if existing_environment:
raise ValidationError("Existing environment for given name.")
Expand Down

0 comments on commit de08e32

Please sign in to comment.