aboutsummaryrefslogtreecommitdiffstats
path: root/servo/models
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2021-05-12 16:22:43 +0300
committerFilipp Lepalaan <filipp@mac.com>2021-05-12 16:22:43 +0300
commit71226657449ae821f6a89682eb2a8873aaad8210 (patch)
tree55dafa63d24d43090aaf4309dff2bc57a2ba0182 /servo/models
parent20f14c505de3f0f327aecc30aeea8d32e57f13b8 (diff)
downloadServo-71226657449ae821f6a89682eb2a8873aaad8210.tar.gz
Servo-71226657449ae821f6a89682eb2a8873aaad8210.tar.bz2
Servo-71226657449ae821f6a89682eb2a8873aaad8210.zip
Fix manage check warnings
Diffstat (limited to 'servo/models')
-rw-r--r--servo/models/device.py2
-rw-r--r--servo/models/note.py4
-rw-r--r--servo/models/repair.py6
3 files changed, 7 insertions, 5 deletions
diff --git a/servo/models/device.py b/servo/models/device.py
index 6487179..a506874 100644
--- a/servo/models/device.py
+++ b/servo/models/device.py
@@ -79,7 +79,7 @@ class Device(models.Model):
max_length=128,
verbose_name=_("Next Tether Policy")
)
- unlocked = models.NullBooleanField(default=None, editable=False)
+ unlocked = models.BooleanField(default=None, editable=False, null=True)
slug = models.SlugField(null=True, editable=False, max_length=128)
PRODUCT_LINES = gsxws.products.models()
LINE_CHOICES = [(k, x['name']) for k, x in PRODUCT_LINES.items()]
diff --git a/servo/models/note.py b/servo/models/note.py
index 52aacb7..77865cd 100644
--- a/servo/models/note.py
+++ b/servo/models/note.py
@@ -652,8 +652,8 @@ class Article(models.Model):
product_model = ArrayField(models.CharField(max_length=128),
null=True,
editable=False)
- read_by = ArrayField(models.IntegerField(), default=[])
- flagged_by = ArrayField(models.IntegerField(), default=[])
+ read_by = ArrayField(models.IntegerField(), default=list)
+ flagged_by = ArrayField(models.IntegerField(), default=list)
def get_creation_date(self):
return self.date_created
diff --git a/servo/models/repair.py b/servo/models/repair.py
index 3568684..6af3d32 100644
--- a/servo/models/repair.py
+++ b/servo/models/repair.py
@@ -190,12 +190,14 @@ class Repair(models.Model):
)
component_data = models.TextField(default='', editable=False)
- consumer_law = models.NullBooleanField(
+ consumer_law = models.BooleanField(
default=None,
+ null=True,
help_text=_('Repair is eligible for consumer law coverage')
)
- acplus = models.NullBooleanField(
+ acplus = models.BooleanField(
default=None,
+ null=True,
verbose_name=_('AppleCare+'),
help_text=_('Repair is covered by AppleCare+')
)