Add guard to keep commits count from having a NoMethodError
What does this MR do and why?
This MR should keep the 500 error from happening that was mentioned in #576241 (closed). The bigger problem (large number of commits) is still there, but it will no longer error out.
Related to #576241 (closed)
Edited by Gary Holtz