aboutsummaryrefslogtreecommitdiffstats
path: root/servo/models/device.py
diff options
context:
space:
mode:
Diffstat (limited to 'servo/models/device.py')
-rw-r--r--servo/models/device.py4
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: