Skip to content

Commit

Permalink
fix #158
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 24, 2024
1 parent bfa6ec6 commit 1de30f2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions auctions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3389,11 +3389,16 @@ def on_save_auction(sender, instance, **kwargs):
if instance.is_online:
if instance.lot_submission_end_date > instance.date_end:
instance.lot_submission_end_date = instance.date_end
if instance.lot_submission_start_date > instance.date_start:
instance.lot_submission_start_date = instance.date_start
else:
if instance.lot_submission_end_date > instance.date_start:
instance.lot_submission_end_date = instance.date_start
if instance.lot_submission_start_date > instance.date_start:
instance.lot_submission_start_date = instance.date_start
# I don't see a problem submitting lots after the auction has started,
# or any need to restrict when people add lots to an in-person auction
# So I am not putting any new validation checks here
# OK, the above comment was not correct, this caused confusion. A couple checks have been added.
# Admins can always override those, and they seem to be adding most of the lots for in person stuff anyway.

# if this is an existing auction
if instance.pk:
Expand Down

0 comments on commit 1de30f2

Please sign in to comment.