From 5047e7965d3c9c2c0c12ad7855b022035250dfd9 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 24 Dec 2017 23:53:13 +0100 Subject: [PATCH] change the __str__ return value for the computer class to string as the name suggests __str__ needs to be of type string. --- docs/docs.org | 2 +- inventory/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.org b/docs/docs.org index 531f68b..5795dda 100644 --- a/docs/docs.org +++ b/docs/docs.org @@ -208,7 +208,7 @@ class Computer(Device): on_delete=models.PROTECT) def __str__(self): - return self.hostname + return str(self.hostname) #+END_SRC ** ComputerDiskRelation and ComputerRamRelation diff --git a/inventory/models.py b/inventory/models.py index 41f0223..8a17db0 100644 --- a/inventory/models.py +++ b/inventory/models.py @@ -148,7 +148,7 @@ class Computer(Device): on_delete=models.PROTECT) def __str__(self): - return self.hostname + return str(self.hostname) class ComputerDiskRelation(models.Model):