core: change provider to one-to-one field
This commit is contained in:
parent
76a43a7818
commit
1039555113
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 2.1.3 on 2018-11-25 16:38
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('passbook_core', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='application',
|
||||||
|
name='provider',
|
||||||
|
field=models.OneToOneField(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='passbook_core.Provider'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -49,7 +49,8 @@ class Application(RuleModel):
|
||||||
name = models.TextField()
|
name = models.TextField()
|
||||||
launch_url = models.URLField(null=True, blank=True)
|
launch_url = models.URLField(null=True, blank=True)
|
||||||
icon_url = models.TextField(null=True, blank=True)
|
icon_url = models.TextField(null=True, blank=True)
|
||||||
provider = models.ForeignKey('Provider', null=True, default=None, on_delete=models.SET_DEFAULT)
|
provider = models.OneToOneField('Provider', null=True,
|
||||||
|
default=None, on_delete=models.SET_DEFAULT)
|
||||||
skip_authorization = models.BooleanField(default=False)
|
skip_authorization = models.BooleanField(default=False)
|
||||||
|
|
||||||
objects = InheritanceManager()
|
objects = InheritanceManager()
|
||||||
|
|
Reference in New Issue