Skip to content

Commit

Permalink
Fix pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ltan02 committed Apr 11, 2024
1 parent 60e84a9 commit 28ef83c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
5 changes: 1 addition & 4 deletions backend/bid/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
from django.contrib.contenttypes.models import ContentType
from rest_framework import status
from rest_framework.generics import get_object_or_404
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView

from auction.models import Auction, AuctionDay
from services.AWSCognitoService import AWSCognitoService
from vehicle.models import Equipment, Trailer, Vehicle

from .models import Bid
from .serializers import BidSerializer
Expand Down Expand Up @@ -45,8 +44,6 @@ def post(self, request, *args, **kwargs):
status=status.HTTP_400_BAD_REQUEST,
)

auction = get_object_or_404(Auction, id=data.get("auction_id"))
auction_day = get_object_or_404(AuctionDay, id=data.get("auction_day_id"))
bidder = self.cognitoService.get_user_details(data.get("bidder_id"))
if not bidder:
return Response(
Expand Down
12 changes: 0 additions & 12 deletions backend/vehicle/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@
from .models import Brand, Equipment, Supplier, Trailer, Type, UnitImage, Vehicle


class BrandSerializer(serializers.ModelSerializer):
class Meta:
model = Brand
fields = ["id", "name"]


class TypeSerializer(serializers.ModelSerializer):
class Meta:
model = Type
fields = ["id", "name"]


class EquipmentSerializer(serializers.ModelSerializer):
brand_name = serializers.SerializerMethodField()
type_name = serializers.SerializerMethodField()
Expand Down
3 changes: 2 additions & 1 deletion backend/vehicle/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def get_permissions(self):

def get(self, request, *args, **kwargs):
"""
Get a list of items filtered by type, brand, current price range, and search term. Supports pagination.
Get a list of items filtered by type, brand, current price range,
and search term. Supports pagination.
"""
item_type = request.query_params.get("type", None)
brand_id = request.query_params.get("brand", None)
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/ListingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
export default function ListingsPage() {
const [currentPage, setCurrentPage] = useState(1);
const [totalPages, setTotalPages] = useState(0);
// eslint-disable-next-line no-unused-vars
const [loading, setLoading] = useState(false);
const [hasNextPage, setHasNextPage] = useState(null);
const [hasPrevPage, setHasPrevPage] = useState(null);
Expand Down

0 comments on commit 28ef83c

Please sign in to comment.