Files
django-mfa2/mfa/migrations/0009_user_keys_owned_by_enterprise.py
Mohamed El-Kalioby 0b0a3230fa Closes #5
Move to True and False
2019-12-13 10:31:32 +02:00

21 lines
625 B
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('mfa', '0008_user_keys_last_used'),
]
operations = [
migrations.AddField(
model_name='user_keys',
name='owned_by_enterprise',
field=models.NullBooleanField(default=None),
),
migrations.RunSQL("update mfa_user_keys set owned_by_enterprise = %s where key_type='FIDO2'"%(True if getattr(settings,"MFA_OWNED_BY_ENTERPRISE",False) else False ))
]