Guard against nil body

Stephen Paul Weber created

Change summary

lib/customer_usage.rb | 2 ++
1 file changed, 2 insertions(+)

Detailed changes

lib/customer_usage.rb 🔗

@@ -42,6 +42,8 @@ class CustomerUsage
 	end
 
 	def incr_body(amount, body)
+		return 0 unless body
+
 		hash = Digest::SHA2.hexdigest(body[0..100])
 
 		EMPromise.all([