add etherpad-check to clean method
This commit is contained in:
@@ -164,10 +164,11 @@ class Etherpad(models.Model):
|
|||||||
params={"length": len(pad_name), "pad_name": pad_name},
|
params={"length": len(pad_name), "pad_name": pad_name},
|
||||||
)
|
)
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
self.etherpad_key = create_pad(pad_name)
|
||||||
self.etherpad_key = create_pad(self.__get_pad_name())
|
if not self.etherpad_key:
|
||||||
|
raise ValidationError(
|
||||||
super().save(*args, **kwargs)
|
_(f"Etherpad '{pad_name}' konnte nicht erstellt werden."),
|
||||||
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|||||||
Reference in New Issue
Block a user