add setting to disable UUID check on authentic (fixes #21453)

This commit is contained in:
Benjamin Dauvergne 2018-01-26 18:42:27 +01:00
parent 963582bfcf
commit c3dbb781a9
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ from .exceptions import (PartnerNotFound, CutNotFound, KeyNotFound, NotFound, Mi
def cut_exists(request, cut_uuid):
logger = logging.getLogger(__name__)
if not getattr(settings, 'PETALE_CHECK_CUT_UUID', True):
CUT.objects.get_or_create(uuid=cut_uuid)
return True
authentic_url = getattr(settings, 'PETALE_AUTHENTIC_URL', None)
if not authentic_url:
logger.warning(u'PETALE_AUTHENTIC SETTINGS improperly defined')