diff --git a/ag_data/models.py b/ag_data/models.py index 7c00f135..c401b151 100644 --- a/ag_data/models.py +++ b/ag_data/models.py @@ -53,9 +53,6 @@ class AGSensor(models.Model): name = models.CharField(max_length=1024, blank=True) type_id = models.ForeignKey(AGSensorType, null=False, on_delete=models.PROTECT) - # def __str__(self): - # return u"{0}".format(self.name) - class AGMeasurement(models.Model): """Stores the information about sensor measurements, including timestamp, event, sensor diff --git a/mercury/grafanaAPI/grafana_api.py b/mercury/grafanaAPI/grafana_api.py index 7a662933..7a3113e4 100644 --- a/mercury/grafanaAPI/grafana_api.py +++ b/mercury/grafanaAPI/grafana_api.py @@ -118,7 +118,7 @@ def get_dashboard_by_name(self, event_name): return None def get_dashboard_url_by_name(self, name): - name = name.lower().replace(" ", "-") + name = name.strip().lower().replace(" ", "-") dashboard = self.get_dashboard_by_name(name) if dashboard: