misc: remove postgres.E003 warnings (#52028)
This commit is contained in:
parent
f9015d2a90
commit
384fedc6da
|
@ -21,8 +21,8 @@ class Migration(migrations.Migration):
|
|||
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
('data_type', models.CharField(max_length=50)),
|
||||
('data_parameters', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
||||
('data_values', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
||||
('data_parameters', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
||||
('data_values', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
||||
('last_update_datetime', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -16,6 +16,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='cartadsdossier',
|
||||
name='cartads_steps_cache',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(default={}),
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(default=dict),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -16,6 +16,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='cartadsdossier',
|
||||
name='cartads_cache_infos',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(default={}),
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(default=dict),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -62,8 +62,8 @@ def key_value_of_stringstring(d):
|
|||
|
||||
class CartaDSDataCache(models.Model):
|
||||
data_type = models.CharField(max_length=50)
|
||||
data_parameters = JSONField(default={})
|
||||
data_values = JSONField(default={})
|
||||
data_parameters = JSONField(default=dict)
|
||||
data_values = JSONField(default=dict)
|
||||
last_update_datetime = models.DateTimeField(auto_now=True)
|
||||
|
||||
|
||||
|
@ -97,8 +97,8 @@ class CartaDSDossier(models.Model):
|
|||
cartads_id_dossier = models.CharField(max_length=50, null=True)
|
||||
cartads_numero_dossier = models.CharField(max_length=50, null=True)
|
||||
cartads_cache_code_acces = models.CharField(max_length=200, null=True)
|
||||
cartads_cache_infos = JSONField(default={})
|
||||
cartads_steps_cache = JSONField(default={})
|
||||
cartads_cache_infos = JSONField(default=dict)
|
||||
cartads_steps_cache = JSONField(default=dict)
|
||||
last_update_datetime = models.DateTimeField(auto_now=True)
|
||||
subscribers = models.ManyToManyField(CartaDSSubscriber, blank=True)
|
||||
formdata_url = models.CharField(null=True, max_length=200)
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import django.contrib.postgres.fields
|
||||
from django.db import migrations, models
|
||||
import passerelle.sms.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,7 +37,7 @@ class Migration(migrations.Migration):
|
|||
max_length=32,
|
||||
null=True,
|
||||
),
|
||||
default=['all'],
|
||||
default=passerelle.sms.models.authorized_default,
|
||||
size=None,
|
||||
verbose_name='Authorized Countries',
|
||||
),
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import django.contrib.postgres.fields
|
||||
from django.db import migrations, models
|
||||
import passerelle.sms.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,7 +37,7 @@ class Migration(migrations.Migration):
|
|||
max_length=32,
|
||||
null=True,
|
||||
),
|
||||
default=['all'],
|
||||
default=passerelle.sms.models.authorized_default,
|
||||
size=None,
|
||||
verbose_name='Authorized Countries',
|
||||
),
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import django.contrib.postgres.fields
|
||||
from django.db import migrations, models
|
||||
import passerelle.sms.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,7 +37,7 @@ class Migration(migrations.Migration):
|
|||
max_length=32,
|
||||
null=True,
|
||||
),
|
||||
default=['all'],
|
||||
default=passerelle.sms.models.authorized_default,
|
||||
size=None,
|
||||
verbose_name='Authorized Countries',
|
||||
),
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import django.contrib.postgres.fields
|
||||
from django.db import migrations, models
|
||||
import passerelle.sms.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,7 +37,7 @@ class Migration(migrations.Migration):
|
|||
max_length=32,
|
||||
null=True,
|
||||
),
|
||||
default=['all'],
|
||||
default=passerelle.sms.models.authorized_default,
|
||||
size=None,
|
||||
verbose_name='Authorized Countries',
|
||||
),
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import django.contrib.postgres.fields
|
||||
from django.db import migrations, models
|
||||
import passerelle.sms.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,7 +37,7 @@ class Migration(migrations.Migration):
|
|||
max_length=32,
|
||||
null=True,
|
||||
),
|
||||
default=['all'],
|
||||
default=passerelle.sms.models.authorized_default,
|
||||
size=None,
|
||||
verbose_name='Authorized Countries',
|
||||
),
|
||||
|
|
|
@ -27,7 +27,7 @@ class Migration(migrations.Migration):
|
|||
('caller', models.CharField(max_length=64)),
|
||||
('start_timestamp', models.DateTimeField(auto_now_add=True)),
|
||||
('end_timestamp', models.DateTimeField(default=None, null=True)),
|
||||
('details', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
||||
('details', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-start_timestamp'],
|
||||
|
|
|
@ -150,7 +150,7 @@ class Call(models.Model):
|
|||
caller = models.CharField(blank=False, max_length=64)
|
||||
start_timestamp = models.DateTimeField(auto_now_add=True)
|
||||
end_timestamp = models.DateTimeField(null=True, default=None)
|
||||
details = JSONField(default={})
|
||||
details = JSONField(default=dict)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Phone Call')
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import django.contrib.postgres.fields
|
||||
from django.db import migrations, models
|
||||
import passerelle.sms.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,7 +37,7 @@ class Migration(migrations.Migration):
|
|||
max_length=32,
|
||||
null=True,
|
||||
),
|
||||
default=['all'],
|
||||
default=passerelle.sms.models.authorized_default,
|
||||
size=None,
|
||||
verbose_name='Authorized Countries',
|
||||
),
|
||||
|
|
|
@ -760,7 +760,7 @@ class Job(models.Model):
|
|||
resource = fields.GenericForeignKey('resource_type', 'resource_pk')
|
||||
method_name = models.CharField(max_length=50)
|
||||
natural_id = models.CharField(max_length=256, blank=True, null=True)
|
||||
parameters = JSONField(default={})
|
||||
parameters = JSONField(default=dict)
|
||||
creation_timestamp = models.DateTimeField(auto_now_add=True)
|
||||
update_timestamp = models.DateTimeField(auto_now=True)
|
||||
done_timestamp = models.DateTimeField(null=True)
|
||||
|
@ -776,7 +776,7 @@ class Job(models.Model):
|
|||
('completed', _('Completed')),
|
||||
),
|
||||
)
|
||||
status_details = JSONField(default={})
|
||||
status_details = JSONField(default=dict)
|
||||
|
||||
class Meta:
|
||||
ordering = ('id',)
|
||||
|
@ -841,7 +841,7 @@ class ResourceLog(models.Model):
|
|||
levelno = models.IntegerField(verbose_name='log level')
|
||||
sourceip = models.GenericIPAddressField(blank=True, null=True, verbose_name=_('Source IP'))
|
||||
message = models.TextField(verbose_name='message')
|
||||
extra = JSONField(verbose_name='extras', default={})
|
||||
extra = JSONField(verbose_name='extras', default=dict)
|
||||
transaction_id = models.UUIDField(null=True, db_index=True)
|
||||
|
||||
class Meta:
|
||||
|
|
|
@ -51,6 +51,10 @@ SEND_SCHEMA = {
|
|||
}
|
||||
|
||||
|
||||
def authorized_default():
|
||||
return [SMSResource.ALL]
|
||||
|
||||
|
||||
class SMSResource(BaseResource):
|
||||
manager_form_base_class = SMSConnectorForm
|
||||
category = _('SMS Providers')
|
||||
|
@ -83,7 +87,7 @@ class SMSResource(BaseResource):
|
|||
authorized = ArrayField(
|
||||
models.CharField(max_length=32, null=True, choices=AUTHORIZED),
|
||||
verbose_name=_('Authorized Countries'),
|
||||
default=[ALL],
|
||||
default=authorized_default,
|
||||
)
|
||||
|
||||
allow_premium_rate = models.BooleanField(
|
||||
|
|
Loading…
Reference in New Issue