mirror of
https://github.com/ansible/awx.git
synced 2026-04-13 22:19:27 -02:30
reimplement licensing to work with RHSM and entitlement uploads
Co-authored-by: Christian Adams <chadams@redhat.com>
This commit is contained in:
17
awx/conf/migrations/_subscriptions.py
Normal file
17
awx/conf/migrations/_subscriptions.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
from django.conf import settings
|
||||
|
||||
from awx.main.utils.licensing import Licenser
|
||||
|
||||
logger = logging.getLogger('awx.conf.settings')
|
||||
|
||||
__all__ = ['clear_old_license']
|
||||
|
||||
|
||||
def clear_old_license(apps, schema_editor):
|
||||
# Setting = apps.get_model('conf', 'Organization')
|
||||
# setting.objects.filter(key=LICENSE)
|
||||
licenser = Licenser()
|
||||
if licenser._check_product_cert():
|
||||
settings.LICENSE = licenser.UNLICENSED_DATA.copy()
|
||||
Reference in New Issue
Block a user