jyundt / oval

The Oval
https://theoval.us
GNU General Public License v2.0
1 stars 0 forks source link

Remove duplicitous Point Prime tracking #113

Closed jyundt closed 7 years ago

jyundt commented 7 years ago

Previously, when a Participant won the point prime the following would occur:

With this change, we are no longer creating the additional Prime object and inserting it into the database. The Race view will add an additional row to the Primes table if a Participant has point_prime=True

johnwheffner commented 7 years ago

I assume when releasing this you'll just run a sql script manually that drops all primes called "point prime"?

johnwheffner commented 7 years ago

Small thing: if somehow there were ever multiple point primes for a race (for instance, if there was a tie?), this would silently show only one, arbitrarily. It might be safer to write the code handling it as a collection and loop over all of them rather than treat it singularly.

jyundt commented 7 years ago

I assume when releasing this you'll just run a sql script manually that drops all primes called "point prime"?

You say "script", I say "run the first sql command that pops up on SO and hope for the best..."

But yes, I'll manually clean up the old Prime entries after this is pushed.

Small thing: if somehow there were ever multiple point primes for a race (for instance, if there was a tie?), this would silently show only one, arbitrarily. It might be safer to write the code handling it as a collection and loop over all of them rather than treat it singularly.

Not a bad idea, it might also help us (visually) see if there are >1 Participants with point_prime by mistake.

johnwheffner commented 7 years ago

You say "script", I say "run the first sql command that pops up on SO and hope for the best..."

Well, you do work at Uber...

jyundt commented 7 years ago

You say "script", I say "run the first sql command that pops up on SO and hope for the best..."

Well, you do work at Uber...

Yikes, I'm going to need some ointment for that burn...ouch.