MySQL returns a decimal type for the tuple, which we need to convert to an int

This commit is contained in:
Joseph Schorr 2015-05-08 14:55:54 -04:00
parent 36f33e8fd7
commit 3b93854c0b

View file

@ -2803,7 +2803,7 @@ def _get_repository_events(repository, time_delta, time_delta_earlier, clause):
.tuples()
.get())
return (result[0] or 0, result[1] or 0)
return (int(result[0]) if result[0] else 0, int(result[1]) if result[1] else 0)
def get_repository_pushes(repository, time_delta, time_delta_earlier):