'Set the IARC Certificate for this app (IARC v2).'

def set_iarc_certificate(self, cert_id):

    if isinstance(cert_id, basestring):
        cert_id = uuid.UUID(cert_id)
    defaults = {'cert_id': cert_id}
    (cert, created) = IARCCert.objects.safer_get_or_create(app=self, defaults=defaults)
    if (not created):
        cert.update(**defaults)
    return cert
