gdoteof / election

drupal election module
3 stars 1 forks source link

Votes Should Be Integers #14

Closed bradley-holt closed 12 years ago

bradley-holt commented 12 years ago

Description

This is fairly trivial and low priority, but the number of votes should always be an integer value. In some cases they are string values.

Steps to Reproduce

curl 'https://example.org/town-meeting-season-2011/ward-1/ward-1-city-council' \
-H 'Accept: application/json'

Actual Results

{
   "title":"Ward 1 City Council",
   …
   "results":{
      "Sharon Bushor (I) ":{
         "votes":"416",
         "percent":100,
         "winner":true,
         "complete":true
      }
   }
}

Expected Results

{
   "title":"Ward 1 City Council",
   …
   "results":{
      "Sharon Bushor (I) ":{
         "votes":416,
         "percent":100,
         "winner":true,
         "complete":true
      }
   }
}

Additional Comments

This is only applicable to the JSON representation of results.

gdoteof commented 12 years ago

599978c

acrawford commented 12 years ago

code updated on live and dev, looking good.

bradley-holt commented 12 years ago

Looks good to me.