mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 15:57:52 -02:30
Add --skip-errors option to migrate_to_database_settings command, allow any false/null value for 'off' in pendo setting.
This commit is contained in:
@@ -8,9 +8,18 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from awx.conf import fields, register
|
||||
|
||||
|
||||
class PendoTrackingStateField(fields.ChoiceField):
|
||||
|
||||
def to_internal_value(self, data):
|
||||
# Any false/null values get converted to 'off'.
|
||||
if data in fields.NullBooleanField.FALSE_VALUES or data in fields.NullBooleanField.NULL_VALUES:
|
||||
return 'off'
|
||||
return super(PendoTrackingStateField, self).to_internal_value(data)
|
||||
|
||||
|
||||
register(
|
||||
'PENDO_TRACKING_STATE',
|
||||
field_class=fields.ChoiceField,
|
||||
field_class=PendoTrackingStateField,
|
||||
choices=[
|
||||
('off', _('Off')),
|
||||
('anonymous', _('Anonymous')),
|
||||
|
||||
Reference in New Issue
Block a user