Comments (3)
Intended behavior depends on other tickets
- New bids should be validated by the form
- New bids should only be accepted if they are greater than the value of previous bids (currently accepts equal to)
- New bids should not call validation before the required user and listing objects can be attached to the bound bid form/bid object
from cs50_commerce.
limiting the scope of this ticket to correcting the buggy behavior around new bids:
- refactored the Bid.highest_current_bid() function for clarity
- corrected buggy behavior by implementing a validator on the Bid.bid property
- Added control flow to BidForm submissions so that new bids must exceed the Bid.highest_current_bid() value
from cs50_commerce.
noting that Bid.bid validation (outside of modelforms) also broke as a result of this refactor. I've moved back to strictly validating against submitting negative bids within the Bid.save function.
Why? Some form of guardrails should be in place whenever money (or similar serious issues such as lives being at stake) is manipulated/transacted - even if it's fake money.
from cs50_commerce.
Related Issues (14)
- Bids should not be negative HOT 1
- Bid must exceed value of previous bids HOT 1
- Users should be charged for any bids when the auction concludes. HOT 2
- Automatically end Listings HOT 3
- Address datetime errors in the Listing model HOT 2
- Implement code quality best practices HOT 1
- Implement Task Queue/message broker HOT 1
- Watchlist functionality HOT 1
- End Listing (manual)
- User Cash and Credit HOT 1
- User "Credit Card" HOT 2
- Listing Countdown timer HOT 1
- Bid validation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs50_commerce.