First time here? Check out the FAQ!
2

Can't moderate more than 16 bits of karma?
 

I tried giving myself a million karma and got a warning - adding the actual karma worked, but the moderation record complained; the repute object got stored with 32767 for positive and 1000001 for karma.

Does this mean the model field should be changed (assuming you agree this is a bug)?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
rfrankel's avatar
135
rfrankel
asked 14 years ago

Comments

I agree that it is a bug, but it's probably better to add error checking rather than allowing more bits for an instance of reputation change b/c it will be a waste of space. There is a repute for each vote and storage for them does add up.
Evgeny's avatar Evgeny (14 years ago)
see more comments

1 Answer

2

Repute model uses SmallInteger field which in MySQL is in range –32768 to 32767. The user reputation is UnsignedInteger with a much larger range and apparently there is no check on the limits in the code, I've saved this issue in the bug tracker. Thanks.

edit: btw bug tracker is at http://bugs.askbot.org

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 14 years ago, answered 14 years ago
link

Comments

Got it - I'll make sure to put (potential) bugs there and restrict this to things like installation and documentation issues. Thanks again for the help.
rfrankel's avatar rfrankel (14 years ago)
see more comments