diff options
author | Filipp Lepalaan <filipp@mac.com> | 2021-05-13 00:03:23 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2021-05-13 00:03:23 +0300 |
commit | 86c04e60b932b8051cde013396aec84a35eff871 (patch) | |
tree | 045510f7cd7101662fb8a7e807956a5910060ed2 /servo/models/device.py | |
parent | 6514971850a070bd4aeb27aba85e319b852cbd97 (diff) | |
download | Servo-86c04e60b932b8051cde013396aec84a35eff871.tar.gz Servo-86c04e60b932b8051cde013396aec84a35eff871.tar.bz2 Servo-86c04e60b932b8051cde013396aec84a35eff871.zip |
Django 3 fixes
Diffstat (limited to 'servo/models/device.py')
-rw-r--r-- | servo/models/device.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servo/models/device.py b/servo/models/device.py index a506874..148684d 100644 --- a/servo/models/device.py +++ b/servo/models/device.py @@ -206,7 +206,7 @@ class Device(models.Model): @property def tag_choices(self): - return TaggedItem.objects.filter(content_type__model="device").distinct("tag") + return TaggedItem.objects.filter(ref="device").distinct("tag") def add_tags(self, tags): tags = [x for x in tags if x != ''] # Filter out empty tags @@ -528,7 +528,7 @@ class Device(models.Model): return results - def __unicode__(self): + def __str__(self): return '%s (%s)' % (self.description, self.sn) class Meta: |