Closed sig1nt closed 8 years ago
For reference
def get_teams():
# TODO: Team.points ought to be a SQL sum instead of denormalized
return Team.query.order_by(Team.points.desc(), Team.last_fleg).all()
from https://github.com/DeltaHeavy/wrath-ctf-framework/blob/master/ctf/core.py#L32
Should it be? I leave this up to our friendly neighborhood SQLAlchemist and DBA, Nick and Nick, respectively
This is a pretty classic atomicity problem. Enter two flegs at the same time, and your read-update-write will only add one of them to your score. Since the score is just a sum of your flegs anyway, we should reflect that in the implementation.
(Now, if someone actually enters two flegs at the same time, they're probably cheating.)
This is potentially closed by #26.
Close with #26
Even if it's just to remove it