As we discussed I see better solution in https://github.com/inspirehep/ops/commit/c614bcc7fe22531b11c68ac29aca73bc6fb73169