/users/$id.json: fix exception when pool archives is disabled (fix #3123).

This commit is contained in:
evazion
2017-06-07 22:54:16 -05:00
parent bb0be36f05
commit 23fb6b8d15

View File

@@ -712,6 +712,7 @@ class User < ActiveRecord::Base
end
def pool_version_count
return nil unless PoolArchive.enabled?
PoolArchive.for_user(id).count
end