Skip to content

Commit

Permalink
chore: start excluding cancelled bids from auction bid list view of a…
Browse files Browse the repository at this point in the history
… seller
  • Loading branch information
sandronadiradze committed Nov 5, 2024
1 parent d0893e6 commit ec56491
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions bid/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,12 @@ def get_queryset(self):
.prefetch_related("images")
)

# If auction_id is provided, filter by auction
# If auction_id is provided, filter by auction and exclude cancelled bids
if auction_id:
auction = get_object_or_404(Auction, id=auction_id)
queryset = queryset.filter(auction=auction)
queryset = queryset.filter(auction=auction).exclude(
status=StatusChoices.CANCELED
)

return queryset

Expand Down
12 changes: 6 additions & 6 deletions locale/ka/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-04 15:38+0000\n"
"POT-Creation-Date: 2024-11-05 06:25+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -74,32 +74,32 @@ msgstr "თქვენ არ შეგიძლიათ შეცვალო
msgid "There was an error during the update of the auction. Please try again."
msgstr "აუქციონის შექმნისას პრობლემამ იჩინა თავი. გთხოვთ სცადოთ თავიდან."

#: auction/views.py:613
#: auction/views.py:614
msgid "Auction deleted successfully."
msgstr "აუქციონი წარმატებით წაიშალა."

#: auction/views.py:723
#: auction/views.py:724
#, python-brace-format
msgid "Auction with UUID {id} does not exist."
msgstr "აუქციონი მოცემული იდენტიფიკატორით {id} არ არსებობს."

#: auction/views.py:732
#: auction/views.py:733
#, python-brace-format
msgid ""
"{deleted} auctions deleted and {marked_deleted} auctions marked as deleted."
msgstr ""
"წაიშალა {deleted} აუქციონი და {marked_deleted} აუქციონი მონიშნულია, როგორც "
"წაშლილი."

#: auction/views.py:1103
#: auction/views.py:1104
msgid ""
"Only the bids with a status of either Pending or Approved can be declared as "
"winner bids."
msgstr ""
"მხოლოდ დაეფრუვებული ან მომლოდინე რეჟიმის მქონე ბიდები შეიძლება გამოცხადნენ "
"გამარჯვებულებად."

#: auction/views.py:1119
#: auction/views.py:1120
msgid "You can only declare a winner after the auction has been completed."
msgstr ""
"გამარჯვებულის გამოცხადება მხოლოდ აუქციონის დასრულების შემდეგ შეგიძლიათ."
Expand Down

0 comments on commit ec56491

Please sign in to comment.