|
@@ -125,7 +125,7 @@ class Monitor(Model):
|
|
__include_in_export__ = True
|
|
__include_in_export__ = True
|
|
|
|
|
|
guid = UUIDField(unique=True, auto_add=True)
|
|
guid = UUIDField(unique=True, auto_add=True)
|
|
- slug = models.SlugField(null=True)
|
|
|
|
|
|
+ slug = models.SlugField()
|
|
organization_id = BoundedBigIntegerField(db_index=True)
|
|
organization_id = BoundedBigIntegerField(db_index=True)
|
|
project_id = BoundedBigIntegerField(db_index=True)
|
|
project_id = BoundedBigIntegerField(db_index=True)
|
|
name = models.CharField(max_length=128)
|
|
name = models.CharField(max_length=128)
|
|
@@ -155,7 +155,7 @@ class Monitor(Model):
|
|
# NOTE: We ONLY set a slug while saving when creating a new monitor and
|
|
# NOTE: We ONLY set a slug while saving when creating a new monitor and
|
|
# the slug has not been set. Otherwise existing monitors without slugs
|
|
# the slug has not been set. Otherwise existing monitors without slugs
|
|
# would have their guids changed
|
|
# would have their guids changed
|
|
- if self._state.adding is True and self.slug is None:
|
|
|
|
|
|
+ if self._state.adding is True and self.slug == "":
|
|
self.guid = uuid4()
|
|
self.guid = uuid4()
|
|
self.slug = str(self.guid)
|
|
self.slug = str(self.guid)
|
|
return super().save(*args, **kwargs)
|
|
return super().save(*args, **kwargs)
|