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},
|
||||
)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.etherpad_key = create_pad(self.__get_pad_name())
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
self.etherpad_key = create_pad(pad_name)
|
||||
if not self.etherpad_key:
|
||||
raise ValidationError(
|
||||
_(f"Etherpad '{pad_name}' konnte nicht erstellt werden."),
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
Reference in New Issue
Block a user