Skip to content

Commit

Permalink
прошелся black check в github не пропускал
Browse files Browse the repository at this point in the history
  • Loading branch information
Badmajor committed Oct 25, 2024
1 parent b33d586 commit a45a0ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/backend/api/v1/projects/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,7 @@ def validate_project(self, value):
)
.first()
)
if (
user == project.creator
or user == project.owner
):
if user == project.creator or user == project.owner:
raise serializers.ValidationError(
"Вы не можете создать заявку на участие в проекте, в котором "
"уже участвуете."
Expand Down
6 changes: 3 additions & 3 deletions src/backend/api/v1/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ def get_queryset(self) -> QuerySet["ParticipationRequest"]:
status_filter = self.request.query_params.get("status")
if status_filter:
queryset = queryset.filter(status=status_filter)
return queryset.filter(
Q(user=self.request.user)
).only(*PROJECT_PARTICIPATION_REQUEST_ONLY_FIELDS.get(self.action, ()))
return queryset.filter(Q(user=self.request.user)).only(
*PROJECT_PARTICIPATION_REQUEST_ONLY_FIELDS.get(self.action, ())
)

def get_object(self) -> ParticipationRequest:
"""Метод получения объекта запроса на участие в проекте."""
Expand Down

0 comments on commit a45a0ca

Please sign in to comment.